https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70526
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Component|rtl-optimization |middle-end Resolution|--- |FIXED --- Comment #22 from Richard Biener <rguenth at gcc dot gnu.org> --- C++14 3.10/10 (that's basically the same as the C standard says). The question remains on whether ConstantOrRegister cr = ToConstantOrRegister(&lir, 0, MIRType_Object); (the aggregate copy performed by the init expression) applies to "If a program attempts to access the stored value of an object through a grvalue of other than one of the following types..." Where "the stored value" in this case is of type Register and the type of the grvalue is TypedOrValueRegister (which does not include 'Register' as member). To fix your case I'd simply use class TypedOrValueRegister { MIRType type_; union { Register reg_; ... whatever other type you need ... }; ... }; Fixed (what I fixed with the commit) and INVALID for the rest.