https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110403
--- Comment #1 from Janez Zemva <janezz55 at gmail dot com> --- Here is a possible workaround: #define S__(x) ((x) | (x) >> 1 | (x) >> 2 | (x) >> 3 | (x) >> 4) #define BITCEIL(x) ((x) & (x) - 1 ? (S__(x) & ~(S__(x) >> 1)) << 1 : (x)) template <typename T, std::size_t N> using array_t __attribute__ ((vector_size(BITCEIL(N * sizeof(T))))) = T;