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

    <tr>
        <th>Summary</th>
        <td>
            [flang] segmentation fault in Fujitsu test 0908_0908_0016,7
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            crash-on-invalid,
            flang:frontend
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          tblah
      </td>
    </tr>
</table>

<pre>
    Building

[0908_0016](https://github.com/fujitsu/compiler-test-suite/blob/ac5d63a278b47141b51e12bd7ec3b189177d63e9/Fortran/0908/0908_0016.f90) or [0908_0017](https://github.com/fujitsu/compiler-test-suite/blob/ac5d63a278b47141b51e12bd7ec3b189177d63e9/Fortran/0908/0908_0017.f90) results in a segmentation fault inside of flang frontend.
  
To reproduce `flang 0908_0016.f90`.

```
flang version 21.0.0git (git@github.com:llvm/llvm-project.git 992458d26bbd2b8744408dbb4ab8d6b6058301d6)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/tomecl01/build/release-assertions/bin
Build config: +assertions
```

Building with gfortran 13.3.0 gives `Error: Assumed-type variable xx at (1) may only be used as actual argument`
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzMVE2PpDYQ_TXmYoFM8WE4cGC2g5R77pGNC_DG2C1_9M78-8h0TzIrrXKOZMkSfsav3ntVIgS9W8SJdG-kuxUixcP5KUojjkI69TG9JW2Utjthc17dGxvZ8CdjdU-6G4HhiPEeSDMTWAgsu45HktXqTgLLlr7rGBKBZXXnXRv0ZcQQy5B0RAKLNE4SWMTaqb4RwAfZ8rqtZVdjDVJxXBtZD2PNueobHAksi_PRC0tgySxe20Wm2kZGYKTO0y8c-f-JI__k6DEkEwPVlgoacD_RRhG1s3QTyUSqbdAKqdvoZoTd6eadjWhVRdhMKWHzH456vHun0oqU9OwJ-1mLnlUvy3r2Wmx-Ah_oQ34N6opVbNeREhh2HUnLvmjTzMY8skR5K-_efcc1Vhk9jtB2g4JeSgVy4G3bskFJ2Qo5qF72rBsaVquewJjJCr9jJM1MhfDr0bdlsn9Z98OWRtv0Xu42ZdThUSh6OoUmY-8u6HfC5t9tiMIYVDft83cCy-HO7Ex0J66G1dmknFECi0eDImApQkCfBQ35UFvC5ivGdHV20_vzP29fUD-r9AnXdqc_dDzovj09pXVTNRWju35gyML_5r27aM0hpBNVGT_uSB_CayEN0vd3Ki5x62z7KT6os-aDSqQpoKIiULHGJAwVfk85BaRnhZoaNTajKHCqecs5b1hXF8fE16ZXkrdd064gW9aP0Axr369D1htUoSdg0LEOGLB8p-Jjv0kOG-dq7bphJC3DU2hTZUcr5_dCh5BwqlvGx7YwQqIJ1yQAWL0IR-lsqe1DGK0IAIFvBOCKEGnmz1Dmg-5W-OmKiUx7IC0zOsTw7zNRR3ONmOfl7vbr1NPl2Yw0d-Arzv8MG_jGi-TN9B-9_Iu8EliuGnMQXmU-Jvg7AAD__5NViHA">