<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63231>63231</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang] flang-new crashes (gfortran/regression/recursive_statement_functions.f90)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
k-arrows
</td>
</tr>
</table>
<pre>
Crashed by the following program:
https://github.com/llvm/llvm-test-suite/blob/main/Fortran/gfortran/regression/recursive_statement_functions.f90
Here is the reduced program:
```console
$ cat recursive.f90
program recursive
integer :: i, st1, st2
st1 (i) = st2 (i)
st2 (i) = st1 (i)
end
```
In the stack dump, the contiguous part of `Fortran::semantics::IsPureProcedure(Fortran::semantics::Symbol const&)` is observed.
FYI (Gfortran)
```console
$ gfortran -c recursive.f90
recursive.f90:5:12:
5 | st2 (i) = st1 (i)
| 1
Error: Statement function at (1) is recursive
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVE1v2zAM_TXyhUgg098HH7Jm3nor0NNOhWzTjlbbCkS5Rf_9IDsfbTZsxYLAEini6VGPpGLW_URUiuSLSPaBmt3B2PJ5o6w1rxzUpn0r76ziA7VQv4E7EHRmGMyrnno4WtNbNYpoJ-ReyN3BuSN7CyuBVa_dYa63jRkFVsPwcl42jthteNaOBFb1YGqB1aj0JLCqjHVW-V3fXbaWekvM2qxGM1vWL_TETjkaaXJP3Tw1TpuJt10hVyrr9ztZAs0LbUvt3FD7G2mRyvXfmInNQCcvxtAoB5frrtAngOvR6gbQk6OeLHjoaAda4B2wC9cF3_MC7weBuRZYgIj2PuBsX0PwJiT8GEJTe5PC-zvupyVtdqp5hnYej56H9zRmcrqfzcxwVNaB6UCk8vzyC3emUU1ON7ya9_wwW3qwpqF2tiQw_1v049tYm8Ffw05g6umm0qtgaib7Qu32Pc3qx73P6ttF7uJfspwrAzbNn-T56Ip2iYh2IV7lPr0uQAIiu4NPvPMp7vILV_dXa431Qj-eCxHOhQjKeYjQQ2q-rZQbuYK2jNoiKlRAZZjmaZQmiQyDQ0lhFmck8zit8wwxL-I0zlWq8q7NKM-7QJcoMZJpKCUmYRxuuyxLu7qgPE9SamQnYkmj0sPW993W2D7QzDOVaYRRGAyqpoGX1kec6BWWQ4HoJ4Etl16t555FLAfNjq8oTrthmRndoKZeJHtYNhsP0izTgn3-_9_DWASzHcpPDpSjNT-pcQKrJQMWWC0Z_goAAP__1TZ5yQ">