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

    <tr>
        <th>Summary</th>
        <td>
            [Flang][OpenMP] verification of lowering to FIR failed with "address must dereference to value type"
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          k-arrows
      </td>
    </tr>
</table>

<pre>
    Reproducible on Godbolt:
https://godbolt.org/z/5Wa1bqG7d

Reproducer (`flang-new -fopenmp test.f90`):
```console
$ cat test.f90
program p
 implicit none
    logical :: l
    !$omp atomic write
        l = .true.
    !$omp end atomic
end
$ flang-new -fopenmp test.f90
error: address must dereference to value type
error: verification of lowering to FIR failed
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMk0GPnDwMhn-NuViDgoFhOHDY1YjVd_jUai89h2CYtCGhSdjR9tdXwLRTjapqJQRy7Ce2X73IEPRomRson6E8J3KJF-ebbwfpvbuGpHP9e_PKs3f9onRnGJ3FF9d3zkTIn0CcQTxdYpzDGlEL1I57NnV-BGp_ALXlF5l131-qfi_f378uZY9AJziKwUg7Hixf8TC4me00Y-QQ06EWcBRA9e9-a7g9ytngDN9OqUAl4x3aTmfvRi8nnPcQ9TQbrXRE6-wNREQ0btRKGlx75E9o7hmgDKhw04wyukkrvHod_yA3GiE_Yxr9wunfSLb9jd6zbPv7zP_ae6_23vl1Ktn3nkPAaQkRe_Y8sGerGKPDN2kWxvg-8wP0xl4PWsmonUU3oHFX9tqOK9T-94qD1Ib7B2H3MOmbvK_zWibcZJWoRVHVWZlcGllkRdWRyERBojtS3eXVSZWsuqrK1LFKdEOCCkFUZWWelZSeVF2LQVEt-cjHqoJC8CS1SY15m1arJDqEhZtTnhVFYmTHJmyeJNr0AaLVnr5Z6w_dMgYohNEhhvsNUUezGbndiPIM5fOnme3_n6E8f1AHvOp4QSD6oNZEyeJN8_AH6HhZulS5Cahdx7t9DrN3X1lFoHbbNgC128I_AwAA__-nfxWG">