https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110938
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|miscompile if implicit |miscompile if implicit |special member is deleted |special member is deleted |in a subtle way |and mutable --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Reduced: ``` struct X { X(X &) = delete; X(X&&) = delete; X(const X&) = default; }; struct Y { #if 1 mutable #endif X x; int n; }; void print(int); Y f(); void g() { print(f().n); } ``` If we change `#if 1` to `#if 0` then GCC does the correct thing.