https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109139
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:0fc541efc340535d212cd685176bd9592905de8a commit r13-6691-g0fc541efc340535d212cd685176bd9592905de8a Author: Richard Biener <rguent...@suse.de> Date: Wed Mar 15 09:47:18 2023 +0100 tree-optimization/109139 - fix .DEFERRED_INIT removal The following make sure to strip MEMs when looking for unused decls on the LHS of .DEFERRED_INIT. PR tree-optimization/109139 * tree-ssa-live.cc (remove_unused_locals): Look at the base address for unused decls on the LHS of .DEFERRED_INIT. * gcc.dg/torture/pr109139.c: New testcase.