https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105867
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-06-07 Summary|incorrect dangling-pointer |[12/13 Regression] |warning |incorrect dangling-pointer | |warning Status|UNCONFIRMED |NEW Component|middle-end |tree-optimization Target Milestone|--- |12.2 Ever confirmed|0 |1 Keywords| |diagnostic --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Looks the warning does not notice the store was "undone" with later on. We have: MEM[(struct ConsList *)this_3(D) + 8B].value = currNode_5(D); MEM[(struct ConsList *)this_3(D) + 8B].tail = &guard.oldNodeStack; .... <bb 5> [local count: 118111600]: MEM[(struct ConsList *)this_3(D) + 8B] = guard.oldNodeStack; guard ={v} {CLOBBER}; guard ={v} {CLOBBER(eol)}; return; The store to this removes the stored address of the local variable. Confirmed.