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

    <tr>
        <th>Summary</th>
        <td>
            [OpenMP][Flang] Missed semantic check for simd aligned clause
        </td>
    </tr>

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

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

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

<pre>
    OpenMP 5.2 standard states that only pointer variables (C_PTR, Cray pointers, POINTER or ALLOCATABLE items) can appear in simd aligned clause (section 5.11). LLVM Flang does not check this restriction. In consequence LLVM Flang does not generate error message for such code:

```
subroutine simdloop_aligned(n)
  integer :: i, n
  integer :: A(n)
  !$OMP SIMD ALIGNED(A:256)
  do i = 1, n
 A(i) = i
  end do
end subroutine
```
Compilation command:
```
 bin/bbc -fopenmp -emit-fir simd.f90
```

LLVM/Flang version: ae9288d471ec02c8812091ba43b92a5dbec6c38f
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U1GP4yYQ_jX4ZRQLxrFjP_ghm2yqlZLb1XXV1xOGcUzXBhfwVvfvK5xc99puJQsD883A9w2fDMFcLVHLygdWHjO5xMH59ugmY83bXsspvJmsc_p7-zyTvbxAmSOEKK2WXqdJpABxkBGcHb_D7IyN5OFdeiO7kQIwrA_fXl6_MjzAwcu_ISFtvDw_fXl9_ArOw_58fj7sX_cP50cwkabAsAElLch5JunBWAhm0iDHdGENapRLoFQ-kIrGWShzIRg2OZzPv13gNEp7Be0ogHUR1EDqDeJgAngK0Zs1J4cnC8rZQH8sZBV9mnolS15GAvLeeZgoBHkl6J2HsKgBlNPEij3jR8Z_jBW_f-syLJ13SzSWVg6jc_O3Ow-GtWXY3HAASZoreUj1ij2YJJL9n-D-X7kMBcPt8-UFfn26HGF_fvrly-ORYZ3QWFY_QbUDA6w4gvj5gFTQJNlTxPzAktWg3W2V5h9kPuV6cNNsRrl2RLlpklZ_iPNPKHTGMjx1nYJN72ay0wwbmkzc9MavSuV9wz9NvY2pWwxPt369kw_G2aSMpAbrWm93ghRHVdcCeSM6uS26BmWpO1KVKuo-022hm6KRGbWi2u3qssaqyoYWy1JJVYla9U2j-7rgWpS6FmpX4K7RPDMtcix4wQtRbrdY5ciVFsh7rvq60L1mW06TNGM-ju9T7vw1MyEs1FZCVCIbZUdjWE2HaOlPWIMMMXnQtyln0y3XwLZ8NCGGjyrRxHF1682OrDyy8mEVgJVHuJgQSEOgSdpo1P3Vry_1v97JFj-2Q4xzSA3CE8PT1cRh6XLlJoandOb9t5m9-51UZHhabxoYnlYmfwUAAP__UfxK4A">