<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/156267>156267</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] No error checking for unseparated statement number and keyword in free form
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang:frontend
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ohno-fj
</td>
</tr>
</table>
<pre>
```
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:
```fortran
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
$
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysVU2T2zYM_TX0BbMaGvqyDjooSd1bLu30ugORkMVdiXRJKrv77zuU5djZziY91OMZmxbwADy-B1MI5mSZW1F-EuWXHS1xdL51o3UPw9Oud_qtFZXc3rL7i30wzoIbYJjInkDkHSBmMpMCD1Sq4YCqKkosSlUMFetcK4X7-tAfqB-YtRxqXQpsBB67zquxKoTs7isI2f05MlCMpEbWcPbu5GkGgQdRyWCHR2MnY_kRG1k8Fo-YDc2aig2YAMYq5z2rmK1AJnwHMAFEJQfPDIPz85ryGV5MHME6CHwmTzHN1n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