https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112909
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2023-12-08 Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. We diagnose _hurd_setup_sighandler () { if (ss->context) { ... <bb5> scp_67(ab) = PHI <scp_98(D)(4), scp_68(ab)(6)> _105 = setjmp (); if (_105 == 0) scp_202 = scp_67(ab); and scp_98(D) is not initialized from function start but only eventually via the abnormal path (note how the CFG is sligthly incorrect since the abnormal return wouldn't enter setjmp again and also not really bypass the _105 == 0 check). I think the copy we diagnose is a spurious use we just fail to propagate, but scp_67 is really used on an abnormal edge in a PHI (in the abnormal dispatcher). I can't convince myself right now that it's always safe to propagate the copy (scp_202 is single-use with a use in a PHI argument not on an abnormal edge). The copy appears from thread2 which copies along the 9->10 edge, turning # scp_69(ab) = PHI <scp_98(D)(3), scp_67(ab)(9), scp_67(ab)(8)> into a copy there. But we can make uninit analysis look through reg-reg copies, ignoring unguarded uninit uses in those.