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

    <tr>
        <th>Summary</th>
        <td>
            [flang][OpenMP] Crash in atomic update region creation
        </td>
    </tr>

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

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

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

<pre>
    Consider the test case:

```
subroutine sub()
   real :: x
   complex :: y

 !$omp atomic update
       x = x + y
   !$omp end atomic
end subroutine
```

This crashes with `fir.convert op invalid type conversion complex<f32> / f32`
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxcks2SnCAQx5-mvXTtFIKoc_DgzsTbJjnkBVBaJYVgAU523j7ljFu7CdXFR1O_prv_qBjN5IgakK_A-XezmDi_mTgHBZyDvGZqS7MPzdebrPf63ly8i0ZTwDQTJooJBxUJRAvsYSU7jLVx64PfknGEceuB18DPwFpEDKQs7oxo8f3pGvyyWnr_8N6f4RB4Drzwy4oq-cUMuK1aJXoy-9iJ6z7z1weE-IUhpw8OWLsfPlP6L1dg7a_ZRByCijNF_GPSjFCy0YTT4N2NQkK_onE3ZY3GdF8Jn_5ovPvIHsRlFBzENwTe4b4tWaYboc_irDJq8qooeVXVdZXNzTiM_VBxPZbjWHBd6rMu-36URS0KQbrMTMMZl0wykYs859WplnKo-rqQcpR5VRZQMFqUsSdrb8vJhykzMW7U5KIW5zKzqicbD41Hq9wEovUruWU9VA7NTr702xShYNbEFD9jJZPs44c8UXkF-fpjJff2E-QVL3uj0Lh_dcFA06MfgVQy3mVbsM2c0hp3XXkHvJtMmrf-NPgFeLc_diwva_C_aUjAu0cVEXh3FHJr-N8AAAD__1dN1NA">