<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/138950>138950</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang] Flang goes into infinite loop when compiling gfortran test: strictly-structured-block-1.f90
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tarunprabhu
</td>
</tr>
</table>
<pre>
Steps to reproduce:
Assuming that the [LLVM test suite](https://github.com/llvm/llvm-test-suite) is checked out in `./llvm-test-suite`, compile the test as follows
```
$ flang -fopenmp ./llvm-test-suite/Fortran/gfortran/regression/gomp/strictly-structured-block-1.f90
```
Actual behavior: the compiler seems to be in an infinite loop. The memory usage as reported by `top` seems to be insignificant. Compilation did not terminate even after at least 5 minutes on both x86_64 and aarch64.
Expected behavior: Compilation should terminate successfully. If some OpenMP construct used in the test is not supported yet, flang should crash with a TODO message.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMU12L3DYU_TXyy2WMrfHH-MEPk2wNhYQtNPS1yPK1rUaWjO7VbubfF3km6TYstCCwMb46H_ccRWQWh9iL-oOonzIVefWhZxWi24Ma15iNfrr1vzPuBOwh4B78FDWK81UU6VyJ4mbcArwqBl4RRP3h06c_PgMjMVA0jKJ-EvKyMu-U5uQg5LAYXuOYa78JOVj78v1xSmOn-5jswBDoFfVXnMBHBuNANEX-zr9NIeRH0H7bjcWDx4GvCGZvrX-lRLcpHqe4ClnBbJVb4DT7Hd22w3vXymHwgYNyifL84zXgEpDI-OO733YhB-JgNNvbiThEzTHgdBqt119PZT53xc_4xfWqOSoLI67qxfggzteD90NDAELcDtdHTMKVA-Nm4wwjWO_3HL6sCBtuPtwgklowqQ24-8A4wXhLVrHfRVP8dFVaupmNVo5z-HjAKTbewWQmcJ6BMWzGKUbAF3SgZsYAisGiIoYaNuMiI4F3MHpe4dul-bOpQLkJlAp6baoc7hp_-bajPui8UfkWklYf7fQGkaLWSDRHa285_DoD-Q3heUf3-TfQ3t3dhUg4JVd-bNrQQZ3i_jDghpwicV_yA0YHRSu8Gl5BwZfnp2fYkJJ1eTb156k7dyrDvmyrpqnauqyytVdNqZRq5aUZO6yqduxKhbKQ42WaSzw3mellIeuiLtqyq8u6yue2lhW21aXTZ91WlagK3JSxeQpX7sOSGaKIfXm-dHWRWTWipaOCUh5shZSpjaE_0jjGhURVWENM_1zBhu3R2_tE_QTDIXTxSGAc-3-HBV5XdI9opbZ-z_LhXdrJf6Q3i8H2_7PBe_B_oWYhh0MnCTk8pL708u8AAAD__3Nkf54">