https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81889
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- There is a path in the IL that has the array not initialized which is when n is 0. # iftmp.13_23 = PHI <_31(3), 1(36)> _2 = *n_34(D); _107 = (integer(kind=8)) _2; if (_2 > 3) goto <bb 5>; [50.00%] else goto <bb 6>; [50.00%] <bb 6> [local count: 161061274]: _39 = _107 + -1; _40 = _39 < 0; if (_40 != 0) goto <bb 33>; [50.00%] else goto <bb 7>; [50.00%] then we also somehow end up with a lot of threaded(?) paths exposing all (and even impossible) loads from xx. Note the warnings are _all_ from the path dominated by the n <= 3 check! So the warning is obviously valid just the compiler-generated code must be dead in some way it doesn't see... Need some closer investigation, mine for that.