https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102276
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW CC| |qing.zhao at oracle dot com, | |rguenth at gcc dot gnu.org Last reconfirmed| |2021-09-13 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Both cases jump past the initialization - for C++ this would be a invalid testcase I guess while for C we'd warn if the 'x' were initialized. I'm not sure if it is reasonably possible to "fix" these cases. Confirmed for the spurious warning, it is emitted by gimplification on switch (0) <default: <D.1982>> { int x; try { _1 = .DEFERRED_INIT (4, 1, 0); x = _1; __builtin_clear_padding (&x, 0B, 1); <D.1982>: D.1989 = g (&x); return D.1989; } finally { x = {CLOBBER}; } }