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

    <tr>
        <th>Summary</th>
        <td>
            [Flang] failure of maxlocval_1.f90 from gfortran testsuite
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            flang
      </td>
    </tr>

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

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

<pre>
    This test from the gfortran suite fails, exiting with STOP code 1 *only when built with -O1 (or higher)*.  The failure occurs whether or not HLFIR is used.

See the test here https://github.com/llvm/llvm-test-suite/blob/main/Fortran/gfortran/regression/maxlocval_1.f90

Reproduce by building (with -O1 or higher)  and running the executable.

The test is checking extremum behavior of MAXLOC. 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMUjtv3DwQ_DVUs7AgkXdnqVBxnw3hC-DAgX1FuoCPpciEIg0-7PO_D8SDH0mVhiTAmcXM7PCU7OIRJ7L_j-xvG16yCXHKwnHTiKBep5OxCTKmDDqGFbJBWHSIOXIPqdiMoLl1idAbwLPN1i_wYrOBx9P9N5BBIfRA6DF49wovBj2IYl2-YK7ut78hRDB2MRgJHQk9tgAncxlbIkKQssS0cbPBCCGCDxn-v5u_PIBNUBKqlnS3pDtezkfEqrJqNhgRTM5PibAjoTOh82KzKaKVYSV0du757braCFfVEqGzcEEQOq_cekLn-WJ4Y-v3Z8QlYko2-Ao8uyCfufvRt3rsPgt6wKcYVJEI4rW6V1tIhA7vGXwOAIB7BbF4v6E2I3hGWTIXDv_weXrzaBNIg_LXhsdzjriWFQQa_mxDhKDh6_H73f1NC42amBrZyBuc-sM4juNuYENjpv1OdYdxYHvOOB3EQYvDoFEIdthzKblu7EQ7yvq-39Fud90PrewGytSolWL9wFRHdh2u3Lp2S7INcWlsSgWna8q6sXFcoEu1Y5Rqx_1CKN3qFqeavChLIrvO2ZTTx4Rss6vFnCtjf_tRCQ1_5X0p53sxt1zqJpsS3fSP-3-K4SfKTOhctSdC5yr_dwAAAP__ZwMH3g">