https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61428
Jeffrey A. Law <law at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at redhat dot com --- Comment #3 from Jeffrey A. Law <law at redhat dot com> --- This is a case where DOM, VRP and backwards jump threading all fail to simplify the CFG enough, leaving it in a state where the uninit pass is unable to prove the all the paths to free lock_1 are properly guarded. It is the case that VRP1, DOM2, DOM3, VRP2 all successively simplify the CFG, each time they expose an opportunity to thread jumps deeper int the CFG. But in the end, we can only thread through a single join point in the CFG each iteration due to limitations in the copier used by VRP/DOM. The pass best suited for tackling this would be the backwards jump threader. But it doesn't yet know how to extract a constant equivalence from a conditional. So it never has the chance to see the deep jump threads because there are no assignments to need_lock_1. If we were able to derive those equivalences, I suspect the backward threader would likely clean up the CFG significantly. ANyway, we're left with a fairly complex CFG with merge points in very inconvenient places -- making it impossible for tree-ssa-uninit to prove the uses of lock_1 are properly guarded.