https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98594
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |INVALID --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- Hmm, I don't think struct X { int i; } and struct X { unsigned int i; } have the same alias-set (int and unsigned int do). So a reinterpret-cast from one to the other variant violates TBAA rules. That menas that glm::vec needs a CTOR from the signed/unsigned variant rather than using a hack like this - and it seems it has one if Honzas fix still lets things compile? I see template<typename T, qualifier Q> template<typename U, qualifier P> inline constexpr vec<1, T, Q>::vec(vec<1, U, P> const& v) : x(static_cast<T>(v.x)) {} which probably applies and the used CTOR in the bogus case is the compiler-generated one.