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

    <tr>
        <th>Summary</th>
        <td>
            [flang][openmp] Incorrect diagnostic on Openmp Atomic update statement
        </td>
    </tr>

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

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

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

<pre>
    Consider the following test case
```
    integer (kind = 4) :: a
    real :: c
 a = 1
    c = 3
    d = 4
!$omp atomic
    a = a + c + d
end
```

Flang now issues an error
```
./t.f:7:5: error: Atomic update statement should be of form `a = a operator expr` OR `a = expr operator a`
      a = a + c + d
      ^
```

The code is conforming to the standard.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx0UtGKpDoQ_ZrypZgmiaZtH3ywp69wnwYu9wfSSanZjYkkcWb37xdth4ZZBgRJ1TnJqTpHpWRHT9SCvIK8FWrNU4jtTXlL7vV1Il_cg_ndvgafrKGIeSIcgnPhw_oRM6WMWiUC1sGZHR_rEBGtzzRSRBCXn9YbhPKGFYgGoeyg7FAduEjKfdb0VlM7lB9tvZ_K4_R5DetAcBBVmBdUOcxWH4AHWSGI60YVVzTAOvLmi0JgXe-UH9GHD7QprZRQeaQYQ_wCPYHo82mAsquh7OSm8wErO-z2t3FdjMqEKatMM_mMaQqrM3gnDAMOIc4IZ_apLSwUVQ4R6dcS4czw7b9ne6s9Eeq5z-9me_RA_vP3hP9PhDoYQptQB7_p2F0Lu40pK29UNKfCtKVpykYV1PK6Osszqy51MbUDr0nXvBaSNaa5VE115ooLIY2uNZe8sK1gQjLJzrypuKhPTEoth0pxxUkbbqBiNCvrTs69z6cQx2LfdcvLS11dCqfu5NIePiGGzQ8ou7CQnxcQYgtkbDfmy30dE1TM2ZTT865ss9uj-6DKG8jrwZY3_NfrECPpjMaq0YeUrcbg8W1HfGddsUbXTjkvacuk6EH0o83Tej_pMIPot8eP38sSww_SGUT_SBCI_hjsvRV_AgAA__-Caf2d">