https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83997
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- It is actually much worse than just some ICE with -flto. template<int N> using T = int __attribute__((vector_size (sizeof(int) * N))); T<4> q; template<int N> int r __attribute__((vector_size (sizeof(int) * N))); void *s = &r<4>; T<4> foo (T<4> a) { return a + 1; } decltype (r<4>) bar (decltype (r<4>) a) { return a + 1; } shows that when using the T<4> we treat it as normal int, so sizeof (q) is sizeof (int) and foo just adds to int argument 1 and returns that as int. Compare that to the r case which is handled right.