]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/bitint-21.c
72f68c95a29a7baca5a5af5968b637881d75c964
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / bitint-21.c
1 /* PR c/102989 */
2 /* { dg-do compile { target bitint } } */
3 /* { dg-options "-std=gnu2x" } */
4
5 #define IB __SIZEOF_INT__ * __CHAR_BIT__
6 typedef _BitInt(IB) V1 __attribute__((vector_size (sizeof (_BitInt(IB))))); /* { dg-error "invalid vector type for attribute 'vector_size'" } */
7 typedef _BitInt(IB) V2 __attribute__((vector_size (8 * sizeof (_BitInt(IB))))); /* { dg-error "invalid vector type for attribute 'vector_size'" } */
8 #if __BITINT_MAXWIDTH__ >= 575
9 typedef _BitInt(575) V3 __attribute__((vector_size (sizeof (_BitInt(575))))); /* { dg-error "invalid vector type for attribute 'vector_size'" "" { target bitint575 } } */
10 typedef _BitInt(575) V3 __attribute__((vector_size (16 * sizeof (_BitInt(575))))); /* { dg-error "invalid vector type for attribute 'vector_size'" "" { target bitint575 } } */
11 #endif