https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77692
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Richard Biener from comment #3) > So -- is it worth trying to handle this special case where we know a variable > is readonly by means of nothing referencing it? Then the following fixes it: It is certainly worth it, at least as long as the initializer isn't huge (but that is dwarf2out.c business to decide that). Even if the variable is optimized out, people might want to ask about its value in the debugger (and often do).