Re: [PATCH,fortran] Fix Bug 93554 - [13/14/15/16 Regression] ICE in expand_oacc_for ...
Harald Anlauf <[email protected]>
| Newsgroups | gmane.comp.gcc.patches,gmane.comp.gcc.fortran |
|---|---|
| Message-ID | <[email protected]> |
Hi Jerry, Chris, Am 11.04.26 um 6:54 PM schrieb Jerry D: > The attached patch look fairly simple. > > Regression tested on x86_64. > > I plan to commit this one in a little while. Does this need RM approval? It's a change below gcc/ . > I wanted to note that most of these regressions we have been fixing have > been around a long time. I suspect they were not causing too much grief > in the real world or someone would have fixed them already. Regardless, > we want to clean these up as much as we can to improve robustness in > gfortran-16. > > Thanks all, > > Regards. > > Jerry > --- > fortran: Fix ICE in expand_oacc_for with private derived type > [PR93554] > > Using a derived type with an allocatable component in a private clause > on an OpenACC loop caused an ICE in expand_oacc_for because the > finalization code for the allocatable component inserted additional > basic blocks between the loop's continuation/entry blocks and the exit > block, violating the strict CFG assertions. > > The assertions checked that BRANCH_EDGE(entry_bb)->dest == exit_bb and > FALLTHRU_EDGE(cont_bb)->dest == exit_bb, but with finalization blocks > these edges can point to intermediate blocks rather than directly to > the exit. Relax the assertions to only verify the expected edge count > (two successors) without requiring specific destinations. > > PR fortran/93554 > > gcc/ChangeLog: > > * omp-expand.cc (expand_oacc_for): Relax entry_bb and cont_bb > assertions to allow intermediate blocks from finalization code. > Remove exit_bb predecessor count assertion. > > gcc/testsuite/ChangeLog: > > * gfortran.dg/goacc/pr93554.f90: New test. >