https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70667
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> --- I'm not sure if that changes the validity of the test case (the invalid alignment on the member makes the whole class invalid) but the error is the same with A defined with the alignment specifier rather than its member. template <int N> struct alignas (N) A { int a; };