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

    <tr>
        <th>Summary</th>
        <td>
            [flang][OpenMP] Diagnose invalid reduction modifiers
        </td>
    </tr>

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

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

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

<pre>
    Currently the flang frontend will accept the following code.  The `task` modifier on the `reduction` clause is only valid for certain constructs, and `simd` is not one of them.

```
subroutine fred(x)
  integer, intent(inout) :: x

  !$omp simd reduction(task, +:x)
  do i = 1, 100
    x = foo(i)
  enddo
  !$omp end simd
end
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkUstu2zAQ_JrVZRGDpCzZOujgxPCtaA_9AYpcyWworkFSSZyvLyg7D7SAIImc3Zl9jE7JTYGoh-YRlHq-6Ph-Te-gFDTHSi_5zLH_uK0Gttf-aYmRQvZXzGfC0esw4Rg5ZAoWX533qI2hS77B7D2_ujChYUsbxN9nQmhF1ukZWoEzWzc6ishhjYdWRLKLyY5DwY3XSyJ0CTn4K75o7yyOHNFQzNoFNBxSjovJCdQT6mALRXKzLdkuYeCMHAh5LPzzBsQRxOH-bsX9WY9pGSIv2QXCMZIFtX8D1d0wRBcyTRSLSvkNGdTeBV4yqA6hPkB9wLfv7IigJKgtzxcsBeFXY2q_9q-eENQj1IfvOpbRIdRHlAWXQnwAiG_r_chcpL-lULCW_xct-1gnsSIU7D9dV7avbVd3uqJe7mSzb5u2batzTzuxM6LbCi1rqcem2UotjaLRDo1Uoqlcr4Taika2slZStBsrpKhHacR2GJtO7WAraNbOb7x_mTccp8qltFDfqbrbVV4P5NPdcquB7n6LfYl_GJYpwVZ4l3L6Ysgu-9Wnt4zmCM3jzwuFH7-gOeLR6SlwsUq4meRz2p8eS9USfX_O-ZLKvtQJ1Gly-bwMG8MzqFORun8eLpH_kMmgTmvlCdRpLf5vAAAA__-5cfnW">