-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Closed
Closed
Copy link
Labels
flang:frontendquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
Version of flang : 22.0.0(a5cf82c645245c4f6ed3dcc2178b8abfeed0f7d5)/AArch64
The attached program (snf_inline_2904_4_2.f90
) is incorrect.
This program is free form
, with no separation between statement number
and keyword
.
According to Fortran Standard 2023: 6.3.2.2 Blank characters in free form
, a blank shall be used to separate names, constants, or labels from adjacent keywords, names, constants, or labels.
Thus, 10print
in this program requires a space between 10
and print
.
Flang probably needs to detect programming errors during compilation.
The following are the test program, Flang, Gfortran and ifx compilation/execution result.
snf_inline_2904_4_2.f90:
program minimal_example
10print *, 'pass'
end program minimal_example
$ flang snf_inline_2904_4_2.f90; ./a.out
pass
$
$ gfortran snf_inline_2904_4_2.f90
snf_inline_2904_4_2.f90:2:6:
2 | 10print *, 'pass'
| 1
Error: Non-numeric character in statement label at (1)
$
$ ifx snf_inline_2904_4_2.f90; ./a.out
pass
$
Metadata
Metadata
Assignees
Labels
flang:frontendquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Type
Projects
Status
Done