https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82939
--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> --- Unreliable testcase ("works" for me at -O2 but not -O0 -- we need the default-constructed assignment RHS on the stack to have an uninitialized value of non-zero): struct line_maps { ~line_maps (); bool trace_includes; }; line_maps::~line_maps () {} int main () { line_maps m; m.trace_includes = true; m = line_maps (); if (m.trace_includes) return 1; return 0; } at -O2 gcc 4.2.3 optimizes this to just main: .LFB5: movzbl %al, %eax ret ...