https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97197
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |11.0 Resolution|--- |FIXED Status|ASSIGNED |RESOLVED CC| |msebor at gcc dot gnu.org --- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> --- For the test case in comment #0 GCC 11 issues the following so this works as expected (GCC 10 output is similar). In copy constructor ‘Normal::Normal(const Normal&)’, inlined from ‘Combo::Combo(const Combo&)’ at pr97197.C:23:8, inlined from ‘void Y::f()’ at pr97197.C:38:24: pr97197.C:20:35: warning: ‘*((const bool*)& combo +1)’ may be used uninitialized [-Wmaybe-uninitialized] 20 | Normal(Normal const& o) : p(o.p /* warning here for no good reason */) { } | ~~^ pr97197.C: In member function ‘void Y::f()’: pr97197.C:38:16: note: ‘combo’ declared here 38 | for (Combo combo : comboList) { /* implicit copy required to reproduce bug */ | ^~~~~