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

    <tr>
        <th>Summary</th>
        <td>
            [Flang][OpenMP] Error when unstructured code is present 
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          kiranchandramohan
      </td>
    </tr>
</table>

<pre>
    This is another instance where the presence of unstructured code in OpenMP regions leads to failure.

### Error
error: loc("fname.f90":10:3): operation with block successors must terminate its parent block

### Program
```
subroutine sb(ninter, numnod)
  integer :: ninter, numnod
  integer, dimension(:), allocatable :: indx_nm

  !$omp parallel
  if (ninter>0) then
    allocate( indx_nm(numnod) )
 endif
  220      continue
  goto 220
  !$omp end parallel
end subroutine
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU81yozwQfBpxmYpLCGzwgQOJ49tXXw573xLSANqIEaWfze7bbwnb8W4SSsXPTGumW0zLEMxEiB3bP7L9qZApzs53r8ZLUrMk7eXiZknF4PTv7ttsApgAklyc0YOhECUphLcZPUKcEVaPAXPIjZAoRJ9UTB41KKcRDMH_K9J_L-BxMo4CWJQ6QHQwSmOTxx3jJ8b7611UlwXP3jt_CeL2WvVgnWKiZUKMJBfcjUfOhGBVX3JW9RUTxwxyK3oZjSN4M3GGwTr1CiEphSE4H2BJIUJEvxiSEcHEAKv0SPEC_ZrNi3eTl8s1fODXtX2GNHiXoiGEMDDRkqGInoknoLSQ05nXBgTImQk9sKrPVD8h_4XlhDYLUjCOsvCqz7XEE0hrnZJRDhZvtQzpX99p-Zs-ABMlE7Vb1ixRWov2vcUId6rVM2fimP8m3fJw64FMtO_FRfsuCe6ykLQZbxuF4LBdylE0lPCWmFx0OfuZG5L-wC9H7sf64dQL3VX6WB1lgV3Z8LIpywNvirkT48hVW2J1VOqotdCtkvJQy7puDm0rh8J0gouqFLwum5rzZlcfpGy54o06tA0_1KzmuEhjd9b-XHbOT4UJIWHX1FXdFlYOaMNmHCFGK2liVe9WpGXNc7g_Fb7LGx-GNAVWc2tCDPdS0US72e68bd2f2P7x4g22P13mPduKvnJRuNosQpG87eYY17CNw5mJ82TinIadcgsT59zu-nhYvfuBKjJx3mQEJs6bkj8BAAD__4PRPVE">