https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118205
Lewis Hyatt <lhyatt at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Summary|[15 Regression] ICE: in |[15 Regression] ICE: in |as_a, at is-a.h:255 with -O |as_a, at is-a.h:255 with -O |-floop-parallelize-all |-floop-parallelize-all |-ftree-parallelize-loops=2 |-ftree-parallelize-loops=2 | |since r15-6001 Last reconfirmed| |2024-12-27 URL| |https://gcc.gnu.org/piperma | |il/gcc-patches/2024-Decembe | |r/672271.html Ever confirmed|0 |1 --- Comment #4 from Lewis Hyatt <lhyatt at gcc dot gnu.org> --- I think the issue is related to the undefined behavior with the zero-sized array in this testcase. It leads to trying to call reduction_phi() to look up a stmt that is not actually a phi. Prior to r15-6001, that was OK and just returned NULL; in r15-6001 I did not consider that case that the PHI arg to reduction_phi() may not be a gphi. One-line change to check for this case submitted here: https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672271.html.