<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/129457>129457</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang][OpenMP] No error checking of a continuation line that does not have a line to be continued in Fixed Source Form Conditional Compilation Sentinel
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang:openmp
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ohno-fj
</td>
</tr>
</table>
<pre>
```
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:
```fortran
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)
$
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysVl-Pmz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