Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / bitint-1.c
blob5639913623a84009a6774e0f46f40f70a31baecc
1 /* PR c/102989 */
2 /* { dg-do compile { target bitint } } */
3 /* { dg-options "-std=c23" } */
5 void
6 foo (int x)
8 _BitInt (1) a; /* { dg-error "'signed _BitInt' argument must be at least 2" } */
9 signed _BitInt (1) b; /* { dg-error "'signed _BitInt' argument must be at least 2" } */
10 _BitInt (0) c; /* { dg-error "'_BitInt' argument '0' is not a positive integer constant expression" } */
11 unsigned _BitInt (0) d; /* { dg-error "'_BitInt' argument '0' is not a positive integer constant expression" } */
12 _BitInt (-42) e; /* { dg-error "'_BitInt' argument '-42' is not a positive integer constant expression" } */
13 _BitInt (-5) unsigned f; /* { dg-error "'_BitInt' argument '-5' is not a positive integer constant expression" } */
14 _BitInt (4294967295ULL) g; /* { dg-error "'_BitInt' argument '4294967295' is larger than 'BITINT_MAXWIDTH' '\[0-9]+'" } */
15 long _BitInt (42) h; /* { dg-error "both 'long' and '_BitInt' in declaration specifiers" } */
16 long long _BitInt (42) i; /* { dg-error "both 'long' and '_BitInt' in declaration specifiers" } */
17 _BitInt (42) long j; /* { dg-error "both 'long' and '_BitInt' in declaration specifiers" } */
18 _BitInt (42) long long k; /* { dg-error "both 'long' and '_BitInt' in declaration specifiers" } */
19 short _BitInt (42) l; /* { dg-error "both 'short' and '_BitInt' in declaration specifiers" } */
20 _BitInt (42) short m; /* { dg-error "both 'short' and '_BitInt' in declaration specifiers" } */
21 _Complex _BitInt (42) n; /* { dg-error "both 'complex' and '_BitInt' in declaration specifiers" } */
22 _BitInt (42) _Complex o; /* { dg-error "both 'complex' and '_BitInt' in declaration specifiers" } */
23 int _BitInt (42) p; /* { dg-error "two or more data types in declaration specifiers" } */
24 _BitInt (42) int q; /* { dg-error "two or more data types in declaration specifiers" } */
25 _BitInt (x) r; /* { dg-error "'_BitInt' argument is not an integer constant expression" } */