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

    <tr>
        <th>Summary</th>
        <td>
            flang-new unhandled reduction container, UNREACHABLE executed
        </td>
    </tr>

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

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

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

<pre>
    Reproducer below.  LLVM project source updated Feb 5 2024.

flang-new -fopenmp -c <file>

Interestingly, the crash goes away if !$OMP SIMD is removed.

MODULE kernel_module

CONTAINS

  SUBROUTINE kernel

    IMPLICIT NONE

    INTEGER :: xl, xh, yl, yh
    REAL    :: r

 INTEGER :: j, k
    REAL    :: c

    xl = 0 ; xh = 1 ; yl = 0 ; yh = 1
    r = 0.0 ; c = 0.0

    !$OMP PARALLEL 
 !$OMP DO PRIVATE(c) REDUCTION(+ : r) 
    DO k = yl, yh
    !$OMP SIMD 
      DO j = xl, xh
        r = r + c
      ENDDO
 ENDDO
    !$OMP END DO 
    !$OMP END PARALLEL 

  END SUBROUTINE kernel

END MODULE kernel_module


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyElE2TsjgQxz9NuHRpQRCVAwcU3KUKwWL0uW4BaYUxgpWEGf32W0Fd1Kdmn0vefv3vTuelcynrQ4PoEWdBnMDIO1W1wjtizfKvWhpFy65ehmfRsq5EAQXy9nsMEMe_1nAW7SeWCmTbiRKhO7NcIYMVFuAANelkTMyAmP6t3fO8OYwa_IbRvj1jczrDqARiL_c1R2KHz7ZRo1CgVHVz4FdCl6AqhFLksoJDixLy7_wK9R4ItQidpOsNfETrAGoJAk_tF7KXyOs02MUhHFE0yP85tazj-MyXabL1o-TjeQ3gY7fI0t02Sh7KVwwQrTdxtIy2kKRJ-BtMtuFfYQbE9ontw4XrLC6Vbq_9-FoNxlnox7q_G4sXZ2-ePrX4-KO2fN_IhQOxAzCB2Au4VP3E6ifXZ3K9k0EobnR84-Vj9u5_uIKNn_lxHMZwhwMJUthk0S9_GxI6Lwl1IQuD3XIbpQmhc0IXcEubujA4DlI49kF_P6-3ax9Ar_rsVf-d-BN8JCVAxyyfUZgEQXpfeB6_RAuTQAf4Cb0dwMNMo_99TNrgT2_UYJ7NXNvNDfSsmTmzpg51HaPyZmxPHZwUU9em1n7quqyYuXMTbcS56aJr1J7-iiY1HWraE8cZM1rg3rRyy3JNLKwpmZh4yms-5vzrNG7Fwail7NCbmzPbNXheIJd9faBU_94eEkp1uRCe1oyK7iDJxOS1VHLwomrF0Ru-fddUecM4MhDIulLVbQNl26i8blDoy9olWegv__YXcQh4wbJTyIxOcK9S6iz1A6crQleHWlVdMS7bE6ErHe3eje71iNBVv0dJ6KrP4d8AAAD__wxwUzE">