<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/74272>74272</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] Execution error of namelist input statement
</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-new : 18.0.0(770dc47659d41a5ca7b7daf5b3134c900ca8c33d)
```
For `namelist input statement`, execution terminates normally if the input file is:
```
&abc xx=111,yy=222,zz=333,/
```
Execution ends abnormally if the input file is:
```
&abc
x=111,
yy=222,
zz=333,
/
```
Gfortran and ifort terminate normally for all input files.
The following are the test program, Flang-new, Gfortran and ifort compilation/execution result.
ioct149_31.f90:
```fortran
program main
integer(4) :: xx,yy,zz
namelist/abc/ xx,yy,zz
read(5,nml=abc)
print *,xx
print *,yy
print *,zz
end program main
```
```
$ cat data1
&abc xx=111,yy=222,zz=333,/
$
```
```
$ cat data2
&abc
x=111,
yy=222,
zz=333,
/
$
```
```
$ flang-new ioct149_31.f90
$ ./a.out < data1
111
222
333
$ ./a.out < data2
fatal Fortran runtime error(/work/home/ohno/CT/test/fort/tp/reproducerJ/Metro/ioct/ioct149_31.f90:5): 'x' is not an item in NAMELIST group 'abc'
Aborted (core dumped)
$
```
```
$ gfortran ioct149_31.f90
& ./a.out < data1
111
222
333
$ ./a.out < data2
111
222
333
$
```
```
$ ifort ioct149_31.f90
$ ./a.out < data1
111
222
333
$ ./a.out < data2
111
222
333
$
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVkGz2jYQ_jXLZecx8srG-MCBQtxpp-mlmV47srUGpbLEyHIf5Nd3hCGQPJrJy6uHsS2x2v1W37drqWEwO8e8guInKLYzNca9Dyu_d_6p-zhrvD6tYCEuP7EFsf6Tw2C8Q99hZ5XbPTl-RpBrzJZzMRdA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