Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Flang] Cannot scan continuation lines with preprocessor marks #100073

Closed
mjklemm opened this issue Jul 23, 2024 · 4 comments · Fixed by #100178
Closed

[Flang] Cannot scan continuation lines with preprocessor marks #100073

mjklemm opened this issue Jul 23, 2024 · 4 comments · Fixed by #100178
Assignees

Comments

@mjklemm
Copy link
Contributor

mjklemm commented Jul 23, 2024

When compiling the following reproducer, Flang emits an error message:

> flang-new -c ./reproducer.f90
error: Could not scan ./reproducer.f90
somepath/reproducer.F90:4:18: error: Unmatched ')'
           & param3)
                   ^

Reproducer:

subroutine sub()
    implicit none
    integer :: param1, param2, param3
    call something(param1, param2, &
# 4 "somepath/reproducer.F90"
         & param3)
    )
end subroutine sub

This used to work before commit 5d15f60 was merged.

@github-actions github-actions bot added the flang Flang issues not falling into any other category label Jul 23, 2024
@mjklemm
Copy link
Contributor Author

mjklemm commented Jul 23, 2024

@klausler Do you mind having a look at this and see if this is something that can be supported again?

@klausler
Copy link
Contributor

How could that reproducer ever work? It has one more right parenthesis than it has left parentheses.

klausler added a commit to klausler/llvm-project that referenced this issue Jul 23, 2024
…tion

See new test.  A #line (or #) directive after a line ending with &
and before its continuation shouldn't elicit an error about
mismatched parentheses.

Fixes llvm#100073.
@klausler
Copy link
Contributor

#100178

@klausler klausler self-assigned this Jul 23, 2024
klausler added a commit that referenced this issue Jul 30, 2024
#100178)

…tion

See new test. A #line (or #) directive after a line ending with & and
before its continuation shouldn't elicit an error about mismatched
parentheses.

Fixes #100073.
@EugeneZelenko EugeneZelenko added flang:frontend and removed flang Flang issues not falling into any other category labels Jul 30, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Jul 30, 2024

@llvm/issue-subscribers-flang-frontend

Author: Michael Klemm (mjklemm)

When compiling the following reproducer, Flang emits an error message:
> flang-new -c ./reproducer.f90
error: Could not scan ./reproducer.f90
somepath/reproducer.F90:4:18: error: Unmatched ')'
           & param3)
                   ^

Reproducer:

subroutine sub()
    implicit none
    integer :: param1, param2, param3
    call something(param1, param2, &
# 4 "somepath/reproducer.F90"
         & param3)
    )
end subroutine sub

This used to work before commit 5d15f60 was merged.

banach-space pushed a commit to banach-space/llvm-project that referenced this issue Aug 7, 2024
llvm#100178)

…tion

See new test. A #line (or #) directive after a line ending with & and
before its continuation shouldn't elicit an error about mismatched
parentheses.

Fixes llvm#100073.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants