https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109770
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- So we devirtualize during FRE1: Determining dynamic type for call: OBJ_TYPE_REF(_3;(struct Base)_7->1B) (_7); Starting walk at: _1 = MEM[(struct Base *)_7]._vptr.Base; instance pointer: _7 Outer instance pointer: _7 offset: 0 (bits) vtbl reference: MEM[(struct Base *)_7]._vptr.Base Checking constructor call: B::B (_7); Recording type: struct B at offset 0 Determined dynamic type. so eventually the CTOR call handling needs to be removed if we cannot rely on that producing a specific dynamically typed object. Any C++ experts?