https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118954
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2025-02-20 Status|UNCONFIRMED |NEW --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The store to g is gone. I doubt r15-1763-g56670281c6db19 caused it because the store is gone before isel. Before pcom we had: ``` _23 = a.0_1 != -1; // 1 (a is 0) _24 = (int) _23; _27 = 3 - _24; // 2 g[0] = 5; g[1] = 8; ... _20 = (unsigned int) _27; // 2 _19 = _20 + 4294967295; // _20 - 1 == 1 d.4_46 = (int) _19; // 1 _8 = (long unsigned int) d.4_46; // 1 _9 = _8 * 4; // 4 _10 = &g + _9; // &g[1] _11 = *_10; // g[1] == 8 `` After pcom: ``` _23 = a.0_1 != -1; // 1 (a is 0) _24 = (int) _23; _27 = 3 - _24; // 2 g[0] = 5; g[1] = 8; ... _38 = (sizetype) _23; // 1 _45 = _38 * 18446744073709551612; // -4 _29 = &g + _45; // &g[-1] D__lsm0.14_28 = MEM[(int *)_29 + 8B]; // &g[1] ``` But aliasing gets confused by this as &g[-1] is bogus and undefined.