<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/72085>72085</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [Flang] execution error when description of multiple data-stmt-set in a DATA 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(1c876ff5155c4feeb2b2885eb3e6abda17c4b7f4)
```

Initialize with multiple `data-stmt-set` in a DATA statement like this:
```
  DATA (CH(1)(1:3),KK=1,1),ptr/"ABC",t1/
```

The following statement terminates abnormally at runtime:

```
 if(ptr.ne.20)print*,"105"
```

When I change to write one `data-stmt-set` in one `DATA` statement, as shown below, it terminates normally at runtime.

```
  DATA (CH(1)(1:3),KK=1,1)/"ABC"/
 DATA ptr/t1/
```

The following are the test program, Flang-new, Gfortran and ifort compilation/execution result.

FT_integer_spec_data_08_3.f90:
```fortran
program main
  integer,pointer::ptr
  integer,target::t1 =20
 CHARACTER(LEN=5)::CH(5)
  DATA (CH(1)(1:3),KK=1,1),ptr/"ABC",t1/
 if(ptr.ne.20)print*,"105"
  PRINT*,"PASS"
END program main
```

```
$ flang-new FT_integer_spec_data_08_3.f90; ./a.out
Segmentation fault (core dumped)
$
```

```
$ gfortran FT_integer_spec_data_08_3.f90; ./a.out
 PASS
$
```

```
$ ifort FT_integer_spec_data_08_3.f90; ./a.out
 PASS
$
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0Vdtu4zYQ_Rr6ZWCBoi6RH_SgteNusEWwSIL2MaCkkcQtRQrkqO726wtKzm2TtEjRAoYl8TJzzpy5SO9VbxBLln1i2WEjZxqsK-1g7Lb7tqlt-71kOT__-IHx6hd0XlkDtoNOS9NvDZ6AJRXERcQjzkQR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