-
Notifications
You must be signed in to change notification settings - Fork 12k
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 parse a program where write statement is incorrectly positioned in contains section #109609
Labels
Comments
github-actions
bot
added
the
flang
Flang issues not falling into any other category
label
Sep 23, 2024
k-arrows
added
flang:frontend
and removed
flang
Flang issues not falling into any other category
labels
Sep 23, 2024
@llvm/issue-subscribers-flang-frontend Author: None (k-arrows)
Consider the following invalid Fortran program.
```f90
write(*, *) 'OK'
contains
write(*, *) 'NG'
end
```
If you compile the above program with gfortran, the following error message is obtained. The message correctly points out an error in the program.
```console
$ gfortran test.f90
test.f90:3:16:
Error: Unexpected WRITE statement in CONTAINS section at (1)
|
klausler
added a commit
to klausler/llvm-project
that referenced
this issue
Sep 23, 2024
After a CONTAINS statement in a program unit, a statement that cannot begin a subprogram will trigger catastrophic error recovery. But the compiler is presently emitting multiple errors for the same location about expected variations of END statements. Emit fewer messages. Fixes llvm#109609.
klausler
added a commit
that referenced
this issue
Sep 30, 2024
) After a CONTAINS statement in a program unit, a statement that cannot begin a subprogram will trigger catastrophic error recovery. But the compiler is presently emitting multiple errors for the same location about expected variations of END statements. Emit fewer messages. Fixes #109609.
puja2196
pushed a commit
to puja2196/LLVM-tutorial
that referenced
this issue
Oct 2, 2024
…698) After a CONTAINS statement in a program unit, a statement that cannot begin a subprogram will trigger catastrophic error recovery. But the compiler is presently emitting multiple errors for the same location about expected variations of END statements. Emit fewer messages. Fixes llvm/llvm-project#109609.
VitaNuo
pushed a commit
to VitaNuo/llvm-project
that referenced
this issue
Oct 2, 2024
…#109698) After a CONTAINS statement in a program unit, a statement that cannot begin a subprogram will trigger catastrophic error recovery. But the compiler is presently emitting multiple errors for the same location about expected variations of END statements. Emit fewer messages. Fixes llvm#109609.
VitaNuo
pushed a commit
to VitaNuo/llvm-project
that referenced
this issue
Oct 2, 2024
…#109698) After a CONTAINS statement in a program unit, a statement that cannot begin a subprogram will trigger catastrophic error recovery. But the compiler is presently emitting multiple errors for the same location about expected variations of END statements. Emit fewer messages. Fixes llvm#109609.
Sterling-Augustine
pushed a commit
to Sterling-Augustine/llvm-project
that referenced
this issue
Oct 3, 2024
…#109698) After a CONTAINS statement in a program unit, a statement that cannot begin a subprogram will trigger catastrophic error recovery. But the compiler is presently emitting multiple errors for the same location about expected variations of END statements. Emit fewer messages. Fixes llvm#109609.
xgupta
pushed a commit
to xgupta/llvm-project
that referenced
this issue
Oct 4, 2024
…#109698) After a CONTAINS statement in a program unit, a statement that cannot begin a subprogram will trigger catastrophic error recovery. But the compiler is presently emitting multiple errors for the same location about expected variations of END statements. Emit fewer messages. Fixes llvm#109609.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider the following invalid Fortran program.
If you compile the above program with gfortran, the following error message is obtained. The message correctly points out an error in the program.
With flang-new, the following not-so-kind error message is obtained.
The text was updated successfully, but these errors were encountered: