-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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] Preprocessor error when the name to be replaced contains trailing blank in a continuation line #106931
Labels
Comments
EugeneZelenko
added
flang:frontend
and removed
flang
Flang issues not falling into any other category
labels
Sep 1, 2024
@llvm/issue-subscribers-flang-frontend Author: None (ohno-fj)
```
Version of flang-new : 20.0.0(675c748)/AArch64
```
When building elpa, the preprocessor does not work correctly. The following are the test program, Flang-new compilation result. test.F90: #define PRECISION 8
subroutine foo_&
&PRECISION &
&(a,b)
real(kind=8) :: a, b
a = a + b
end subroutine foo_&
&PRECISION
test2.F90: #define PRECISION 8
subroutine foo_&
&PRECISION&
&(a,b)
!&PRECISION &
!&(a,b)
real(kind=8) :: a, b
a = a + b
end subroutine foo_&
&PRECISION
|
klausler
added a commit
to klausler/llvm-project
that referenced
this issue
Sep 2, 2024
Codes using traditional C preprocessors will sometimes put a keyword macro name in a free form continuation line in order to get macro replacement of part of an identifier, as in call subr_& &N& &(1.) where N is a keyword macro. f18 already handles this case, but not when there is white space between the macro name and the following continuation marker character '&'. Allow white space to appear. Fixes llvm#106931.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When building elpa, the preprocessor does not work correctly.
When the name to be replaced contains trailing blank in a continuation line, the preprocessor does not replace that name correctly.
When it does not contain blank, the name is replaced correctly.
The following are the test program, Flang-new compilation result.
test.F90:
test2.F90:
The text was updated successfully, but these errors were encountered: