<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58396>58396</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] Compilation failure in 621.wrf_s
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
kiranchandramohan
</td>
</tr>
</table>
<pre>
The OpenMP single construct can contain a structured block. A structured block allows branches inside. Hence the correct modelling for this is `AnyRegion` and not `SizedRegion<1>`.
So code like the following which will create multiple blocks is allowed. Currently a verification failure happens while converting to LLVM, since the LLVM dialect representation will contain multiple blocks for this.
```
subroutine fun_real(c)
real::psum
logical:: c
!$OMP SINGLE
if(c) then
call myfunc(psum)
end if
!$OMP END SINGLE
end subroutine
```
Current Error
```
error: loc("./tmp2.f90":1:1): 'omp.single' op region #0 ('region') failed to verify constraint: region with 1 blocks
error: Lowering to LLVM IR failed
error: loc("./tmp2.f90":1:1): cannot be converted to LLVM IR: missing `LLVMTranslationDialectInterface` registration for dialect for op: func.func
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydVMFunDAQ_Rq4jIrALBAOHNJs0kZK0qqJeo0MmMWNsZFtstp-fWcMaZq0p65YsGfMm3kzb2hNf2oeRgFfZqFvv4KT-qAEdEY7b5fOQ8c17TyXGjisxsWKHlpluqcEzv-yAVfKHB20lutuFA6kdrIXCXwWuhPgR4K3ViD4ZHqhFIaEwVj0SDzsICrTc336Jg7SaFwD1z1o48l-L3-KfvPkF1mUX6IxidJ9lJ6v93uD6L0AJZ_WWIOhdCjGcZTdCEepFHRWcC9gWpSXM_INiYfgIXnRJ3CxYI7aqxPSfhZWDrLjHuPCwKVCtjDyGWvmCHatGJ7yFMcbuLn5fhuxCyrnRpks0EuuiLcVsxUO0VfENaWtyO9zeqnMG5bIervC1i2tNQsGR7qLfkRyKmJnXcTq1R8M-Tles1um1abMARltZug2XJZFbPcFhXB_fffp5nK1Av7ksCESG_1qxx-iKJhOGBn9ZyHCS2ByC2wfvv0O__Ju_yYGnXql8U-W633rC1xaa-w_z4ngQVJYQEwoYiyJ2JWfZpYMdYpb9GXhj2nisYhVZpqTVfq4ATNjh0hj6MpTCBjVasEF1YA0gHrHTgdpnLaBwf55QtzePko_QrY18l1uN6gy-4da4Prbhvp_JHBOaUba30pc09ug6cQkHVGkMSLrA46nU0GA-1WW19oLO_BO0NARBWK0Sh41-KJdWpuZAKnhSej62y7EosnKsqiLqsrKuG_yvs5rHnvplWii4uOV4voQFXu4wLJL9XaqcAJKliVHOzy6eLGqGb2fHamUXeF1wJIubdIZ1NiVUs8vjw-zNT8wPdwizUU4XBRneV3GY1O3aVHlVZ3VIuuGahjO2l2dZv2O57s-T9tY8VYoR6lhXbU4QoCgGhf7WDYsZSxLs5KxNCvKpCp5xfuirfrdwHjPo10qJsw-oTwSYw-xbUJK7XJw6FRYR_fq5NiFgxahEoTPFz8a2zzJ8LnEb53lk8FnHJJoAolfG_HJxg">