https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106238
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=109514 Keywords|needs-bisection | --- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> --- Comment 1 and comment 5 were both fixed by Jason's r13-7190-g9964df74a9e99e850bf -Wdangling-pointer: fix MEM_REF handling [PR109514] Here we hit the MEM_REF case, with its arg an ADDR_EXPR, but had no handling for that and wrongly assumed it would be a reference to a local variable. This patch overhauls the logic for deciding whether the target is something to warn about so that we only warn if we specifically recognize the target as non-local. None of the existing tests regress as a result. PR c++/109514 gcc/ChangeLog: * gimple-ssa-warn-access.cc (pass_waccess::check_dangling_stores): Overhaul lhs_ref.ref analysis.