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

    <tr>
        <th>Summary</th>
        <td>
            read of string to integer variable fails on internal compiler error
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    The following snippet of code fails on a compiler error with the amdflang-new compiler (see attached log file) 

`program TEST

  implicit none 
  
  integer(4) nrun, stat
  character(len=20) :: nrun_string

  call GetArg(1,nrun_string)
  read(nrun_string,iostat=stat) nrun


 
end program TEST
`

[flang-new.txt](https://github.com/user-attachments/files/17797065/flang-new.txt)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8UsGSmzoQ_BpxmbJLDAajAwfv-vl9QPaeEmIAJUKipGE3ydenwOtdO5XKRVOl7hlNt1qnZAdP1IjySZTnTC88htj8itZ8z9rQ_WxeRoI-OBferB8geTvPxBB6MKEj6LV1CYIHDSZMs3UUgWIMEd4sj8AjgZ663mk_7Dy9fZIE1okINLM2I3XgwgC9dSRQgZBnIU_vZyXnGIaoJ3j578vLPQRgp9lZYxl88AS32w_UMw0UBdaHdaqPixf4DIk13yhm1FEb3kiOvCjOKLcNipMoTlvL18TR-uHxYaOdg_-JT3EQWOcCn--pqG68SLoTWD-AzzZsKxTnrdw2u9d87b4W8h38xYFKPnSUTx8e7_kHi_IssB6Z57RKwYvAy2B5XNq9CZPAy5Io7q7mT-Q5Cbys7q81Px7VUVblevUw8yYr65qiU4XSGTX5schVXpdKZmPTd11VqqqolMqVaU0rq6LEozL6iFRgldkGJR7yPK9ljaqU-75Cc6C-amudy76V4iBp0tbtnXud9iEOmU1poSbPq7KuMqdbcmnLKuIapw0ViGt0Y7M27dplSOIgnU2cPsewZUfN-h1rdK9fARxuGYFXHa1u3V2gVyR67f7IdbZE1_zD2PXF97KbY_hGhgVetj03c69CXhv8HQAA__-7rRY0">