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

    <tr>
        <th>Summary</th>
        <td>
            [flang][OpenMP] Compilation error of the OpenMP ATOMIC directive
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          ohno-fj
      </td>
    </tr>
</table>

<pre>
    ```
Version of flang-new : 17.0.0(3e0866bf616bf7b293cec93d06d030dd11d7911f)
```

The OpenMP `ATOMIC` directive is a compile-time error.

The following are the test program, flang-new, gfortran and ifort compilation result.

omp_atomic_001_2.f90:
```fortran
program main
 integer(1)::i1=5
!$omp parallel
!$omp atomic
  i1=i1+1
!$omp atomic
  i1=i1-1
!$omp end parallel
  if (i1 .ne. 5) print *,"NG(1) : i1 = ", i1
  print *,"pass"
end program main
```

```
$ flang-new -flang-experimental-exec -fopenmp omp_atomic_001_2.f90
error: loc("/home/users/ea01/ea0178/CT/fort/tp/reproducer_OpenMP/fomp_omp30/omp_atomic_001_2.f90":1:1): input and yielded value must have the same type
error: verification of lowering to FIR failed
$
```

```
$ gfortran -fopenmp omp_atomic_001_2.f90
$
```

```
$ ifort -qopenmp omp_atomic_001_2.f90
$
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVE2PnDgQ_TXFpQQy5YaGA4fOtFjlkM1qNdpry-Ci25HBrDE9mX-_4mMz2c4ckpUA47L9Xn08l5omcx2YK8g-QHaO1BxuzlfuNri4-xI1Tr9WkIv9EWcQp7_YT8YN6DrsrBqu8cAvCPKE6TERiQAqJIsiz5suT_OmOzZUypbbUmqRayGF1mmqj2WadkDlBvnAsH2fb4yfRx4-_YGQi9Pz508fnyAXqI3nNpg7o5lQYev60ViOg-kZ2Xvnk0eUzlnrXsxwReUZw40x8BRw9O7qVQ_09BbIMrl2zgevBlSDRrNMdhIVlrg9T7MN_yFx_XhRwfWmvQiRXijpSgHy9BDcDrtZd3LsldktaIbAV_ZARbpkRp5AnkwK8pztQJQCHVw_4qi8spbto33zYYfD9axJgT6kP7Ux_mEbD_qBC9F0CFSYFJOBE8yAShy9GQICnYCegOj33_YQVlWYFEGeEYiW3Jr0X5yHQ6OapmXPurry_pCgd1XyaKTDd6qMt1_-OrI3PQ9B2Zi_cotx50Ye-hHfrdzmwyKlJQDrWqBi9b--uZ6B6nliPwHVrES6D8cCqH56BqqXMgPVYQSqPY_e6bllf9mkvK7348X1oxRA9bv8RCBP6fquOkAzjHNY5fhq2GrWeFd2ZuznKeBN3TdRT6pnDK8jPwRwZ286027qdR1a98J-uQ3BYf3xT-yUsay_5e_Xkv3tsvxESn8ZfLt88d__GznSldSlLFXEVZof8-IoxVFGt4qyUiqtm0JkLLLsWGjZ6LxspMi6tsy7yFQkSAoiIXJxkDLJukPJUqg0yxV1pYaD4F4Zm1h77xPnr5GZppmrXBRHGVnVsJ3Wrkq0SHFdXCqbnSNfLWfiZr5OcBDWTGF6Qwkm2LUdr9qF7AzZh1072RmfvmtEa4GXgoa3Trm1ybceGc3eVrcQxmnpJ1QD1VcTbnOTtK4HqhfafYhH775wu2h3dXYR-BrMPwEAAP__L-jJ6g">