Open
Description
Version of flang : 21.0.0(c8b40867d144395ad3c306a3cf87f970e0f97f07)/AArch64
The attached program is incorrect.
In Fixed Source Form Conditional Compilation Sentinel
, flang does not output an error message during compilation for a continuation line that does not have a line to be continued.
The following are the test program, Flang, Gfortran and ifx compilation/execution result.
err_sngg081g_2.f:
c$ ! 0 !
print *,'pass'
end
$ export OMP_NUM_THREADS=2; flang -fopenmp err_sngg081g_2.f; ./a.out
flang-20: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
pass
$
$ export OMP_NUM_THREADS=2; gfortran -fopenmp err_sngg081g_2.f; ./a.out
pass
$
$ ifx -qopenmp err_sngg081g_2.f
err_sngg081g_2.f(1): error #5118: First statement in file must not be continued
c$ ! 0 !
-----^
err_sngg081g_2.f(1): error #5082: Syntax error, found INTEGER_CONSTANT '0' when expecting one of: <LABEL> <END-OF-STATEMENT>
; <IDENTIFIER> TYPE MODULE ELEMENTAL IMPURE NON_RECURSIVE ...
c$ ! 0 !
---------^
err_sngg081g_2.f(1): error #6905: A label cannot be zero; it must be an integer in the range 1 through 99999. [0]
c$ ! 0 !
---------^
err_sngg081g_2.f(1): error #6321: An unterminated block exists.
c$ ! 0 !
^
err_sngg081g_2.f(1): error #6323: This label is not defined in this scoping unit. [0]
c$ ! 0 !
---------^
compilation aborted for err_sngg081g_2.f (code 1)
$
Metadata
Metadata
Assignees
Type
Projects
Status
Todo