-
Notifications
You must be signed in to change notification settings - Fork 134
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
Fix in preprocessing for Flexi app #658
Fix in preprocessing for Flexi app #658
Conversation
2d9656b
to
b25ff88
Compare
The preprocessor in flang detects 1.NE.PP_NUM as a number. The fix uses the knowledge that a constant number can have atmost one dot character in it. If more than one dot character is seen then the scanning has gone too far ahead. This fix removes PP_NUM from the number detected and allows for substitution of PP_NUM with the defined preprocessor value.
b25ff88
to
8cc61d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works fine on OpenPOWER.
This might be a stupid question, but why does the preprocessor think that 1.NE (or any |
This could be an artifact of the preprocessor being shared between the PGI Fortran and C/C++ compilers (and hex floating-point constants). It's also possible that it is there to handle |
@bryanpkc please let us know if you need further explanation or if you have concerns. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The preprocessor in fortran detects 1.NE.PP_NUM as a number.
The fix uses the knowledge that a constant number can have
atmost one dot character in it. If more than one dot character
is seen then the scanning has gone too far ahead.
This fix removes PP_NUM from the number detected and allows
for substitution of PP_NUM with the defined preprocessor
value.