<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/84666>84666</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang][OpenMP][Application=FDS] verification of lowering to FIR failed with "'fir.allocmem' op invalid type for allocation"
</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>
When building FDS(https://github.com/firemodels/fds), Flang-new resulted in compilation error such as:
```console
error: loc("/tmp/fds/Build/ompi_gnu_linux/../../Source/divg.f90":818:24): 'fir.allocmem' op invalid type for allocation
error: verification of lowering to FIR failed
make: *** [../makefile:121: divg.o] Error 1
make: *** Waiting for unfinished jobs....
```
The compilation error occurred in https://github.com/firemodels/fds/blob/f190e405e03d7f7e04af64038898fa3cf21e4897/Source/divg.f90#L818.
This problem is probably the same as https://github.com/llvm/llvm-project/issues/81946, but I think it's important to report based on a specific application, so I've written this. Note that I reused the route for the GNU compiler in the existing makefile with some options removed.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVN-P3CYQ_mvwy-gsDP6BH_yw162rk9q0alrlMcL2sCaHwQK8m_vvK-xbNY3SqqdICDOMmfn4vmFkCPpiETtSPZLqnMktzs53zw_Se3cL2eCml-7DjBaGTZtJ2wv05_eEiTnGNRB-IqwnrL_oOG9DPrqFsF5pj4ub0IRkTIGwlrAfoDfSXh4s3sBj2EzECbSF0S2rNjJqZwG9dx7CNs4g99j0TOh9rukxRmeDM3js7icIP4FxI2GCMEZYH5f1nrh_TKgJ61OWjxe7fTTabp8J6_P8Pr13mx-RsH7S10uuWpqi8JMoBOEnVib0_ASENUr7XBrjxgUXwhpwK2h7lUZPEF9WBOU87P79Nl8BvKLXSh8ucAqMu6FPdEYH_dPvoKQ2OB2HFvmMR87TMYBUjzvW5FHaJG_BivTPDtqR6gw_7uwV_xbig9Qx5UsoN6u01WHGCT65IeR5nn_F8pfU_zHjN2Ry47h5f4j4pmLoB-OGZBQtxZJWSPnUqAZpKVVdUi5EK5Tko2IFlqJtvi0R_1kUIv8nTB1g9W4wuMDrUg7mBeKMEOSCIMN_ITXmev88rN59wjES1usQNkyoRdGWdarjYYvwBHHW9hl0JKwJoJfV-ShtTGp6TAYMMuAEzoKEsOKYxAe5rua1BlKk4OCJsOaKcPM6RrQpasjhnYsIcZYpj8ctxUl38G6LR5Ul66d3f76qgj5pkPbwsw67yPc6gZuOMwS3ILg1pQ2Q5LjilGdTx6eWtzLDrmgKSksuap7N3dAWohaKTbwYGONlyQcqBkQhR9bwUmW6Y5SVlKczRUF5Xips6Tiyui7airKalBQXqU2euMydv2Q7i50o67rOjBzQhL3hMKZSU0gPrjpnvtu5H7ZLICU1OsTwd4Soo9m71N5GSHUm1eOvK9pffjvWpy-o5efUo6rz_3x0B0l773jrG2cs27zpvqOqEiV_BQAA__-EN8Jw">