-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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] legacy extension of kind selector does not work properly #78927
Labels
Comments
github-actions
bot
added
the
flang
Flang issues not falling into any other category
label
Jan 22, 2024
EugeneZelenko
added
flang:frontend
and removed
flang
Flang issues not falling into any other category
labels
Jan 22, 2024
@llvm/issue-subscribers-flang-frontend Author: None (foxtran)
In the following example (`test.f`):
```fortran
subroutine test(r8heap, i8heap, scrsize)
integer*4 i8heap(*)
real*8 r8heap(scrsize)
end
```
flang says:
```
$ flang-new test.f
error: Could not scan test.f
./test.f:3:28: error: Unmatched ')'
real*8 r8heap(scrsize)
^
```
I had similar issues with Used version:
|
The |
klausler
added a commit
to klausler/llvm-project
that referenced
this issue
Jan 22, 2024
llvm#78927 contains a case of fixed-form source in which a Hollerith literal is mistakenly tokenized, leading to grief later due to apparently unbalanced parentheses. The source looks like "REAL*8 R8HEAP(SCRSIZE)" and the Hollerith literal is misrecognized as such because it follows "8R". In order to properly tokenize Hollerith literals in old comma-free FORMAT statements like "1 FORMAT(3I5HFLANG)", the tokenizer in the prescanner treats a letter after an integer token ("3I") as a special case. The fix is to do this only when the characters involved are nested in parentheses and Hollerith is a possibility. Fixes llvm#78927.
klausler
added a commit
that referenced
this issue
Jan 26, 2024
#78927 contains a case of fixed-form source in which a Hollerith literal is mistakenly tokenized, leading to grief later due to apparently unbalanced parentheses. The source looks like "REAL*8 R8HEAP(SCRSIZE)" and the Hollerith literal is misrecognized as such because it follows "8R". In order to properly tokenize Hollerith literals in old comma-free FORMAT statements like "1 FORMAT(3I5HFLANG)", the tokenizer in the prescanner treats a letter after an integer token ("3I") as a special case. The fix is to do this only when the characters involved are nested in parentheses and Hollerith is a possibility. Fixes #78927.
Fix has been merged into llvm-project/main. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the following example (
test.f
):flang says:
I had similar issues with
integer*4 i8heap(*)
but I could not reproduce it. I suppose it has the same reason like withreal*8 r8heap(scrsize)
.Used version:
The text was updated successfully, but these errors were encountered: