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

    <tr>
        <th>Summary</th>
        <td>
            [flang][do concurrent] sequential implementation regressed to TODO when local_init are involved
        </td>
    </tr>

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

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

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

<pre>
    It was previously possible to compile miniWeather app with flang, but it just regressed to hitting the following TODO:

```
loc("miniWeather_mpi_do_concurrent.F90":324:40): flang/lib/Optimizer/Transforms/SimplifyFIROperations.cpp:191: not yet implemented: localizers with `init` and `dealloc` regions are not handled yet.
LLVM ERROR: aborting
```

Reproducer (probably meaningless from a functional point of view):

```
  integer, parameter :: N = 10
  integer, target    :: a(N)
  integer            :: t(N)
  integer, pointer   :: p(:)

  a = 1
  p => a

  do concurrent (i=1:N) local(t) local_init(p)
 t(i) = p(i)
  enddo
end
```

Is it possible to avoid switching to the new implementation until all TODOs are implemented in SimplifyFIROperations?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxsVFGPmzgQ_jXmZdQIbGDDAw-0KdJKve4pV909rgwewCtj-2yTKPfrT3aSNu02QgpOvvlm5pvPw72Xs0ZsSfWRUIpu5ucLoZRUh4xvYTGufUOu_0Qn0WWDEZf2OcCZe7AOT9JsXl3AGu_loBCCgdGsViqEVWr5D_KwoANuLZxlWGBSXM-EfoJhCyADvG0-gMPZofcoYvgiQ5B6hrAgTEYpc46nby-HF8I6kqenzm9P3ikzEronlD6ke12tfBXmdTR63JxDHXZ9k8eeWMdoSVhX5oQ2hHX3enolB0L7FxvkKv9DR2j_zXHtJ-NWT2j_l1ytktOlfz6-WHQ8SKP9brSWsK5oisikTYALBohIXFEHFPFnZUauIqW_CkDqXGoZSJ0D1yIeBXIVu6jzKEQkBu4w8S1cC4Ui8u5I3n358vcf8Pl4fDlGZj4YF5X6RRCSd0e0zohtRAeE7q0zAx_UBVbkWupZofcwObMCh2nTY-yFK7BG6gBmgpPE81Wd92oDSB1wjgJ9AssdXzHELKyLFX0Fwg5QvAMG7mYMAHAHckL3X2OOByA8fG6w8BtYShxLTRE3oI0WYN0VmtD8Wkp6t_GdsM_A7_-K6NK7N6JGkrBDnGLMdh0Zofvw_fCaRkb39lZMSCG0SUns7ZCYUQthSN6hFu_n8uyj5R_vCj8ZKcCfZRiXZHqTfK_x_MNHyWyw6SAVcKXSVbha5MFqIDX81qSE9ZlomWhYwzNsi6eyeWI1bZpsaQesJlGXRcGasto3QjBGJ1oXIhf7kk55Jlua0yqvC1qwqmDNbqomRFHTgWJdlk8lKXNcuVQ7pU7rzrg5k95v2BYl2zdPmeIDKn_bLLerlhaLa2PAh2GbPSlzJX3wPyiCDCqto2tEdSDVx58mRqoDePx3Qx0kV78q9dM2iWLBeUH9MMirdvpk1AlFtjnVLiFYnwzUE9rPMizbsBvNGheDOt2_Plhn3nAMhPapy7gYbo2eWvp_AAAA__9KiKmx">