https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109071
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2023-03-09
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Yep, so we produce
<bb 2> [local count: 1073741824]:
if (index_3(D) > 3)
goto <bb 4>; [33.00%]
else
goto <bb 3>; [67.00%]
<bb 4> [local count: 354334800]:
warn ();
*ptr_5(D) = 0;
_17 = MEM <struct nums> [(int *)sg_2(D)].vals[index_3(D)];
warn ();
<bb 5> [local count: 1073741824]:
# _18 = PHI <_14(3), _17(4)>
*ptr_5(D) = _18;
return;
(and BB 3 with a BB4 duplicate w/o warn () calls). If warn () were
noreturn this wouldn't happen.
And yes, we do have (plenty?) duplicates.