https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105145
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-04-05 Status|UNCONFIRMED |NEW CC| |rsandifo at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- There is no infrastructure to retain debug information for memory contents (which includes address-taken local variables which can eventually become registers later). IIRC Richard Sandiford developed some prototype patches to try improve this a bit a few years ago. In particular here we have before DSE1 [t.c:11:8] l_158(address-taken) = [t.c:11:16] &l_141(address-taken); ... l_158(address-taken) ={v} {CLOBBER(eol)}; and l_158 is otherwise unused so DSE elides the store. If we'd call update_address_taken before DSE we'd rewrite l_158 into SSA form and then DSE/DCE would retain a # DEBUG stmt for the value. In this case it is FRE1 which elides all uses of the variable.