Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / pr42611.c
blobc33e248caf500f59da1e3ec42d366c13fbcf6dd1
1 /* PR other/42611 */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
5 #define L \
6 (sizeof (__SIZE_TYPE__) == 1 ? __SCHAR_MAX__ \
7 : sizeof (__SIZE_TYPE__) == sizeof (short) ? __SHRT_MAX__ \
8 : sizeof (__SIZE_TYPE__) == sizeof (int) ? __INT_MAX__ \
9 : sizeof (__SIZE_TYPE__) == sizeof (long) ? __LONG_MAX__ \
10 : sizeof (__SIZE_TYPE__) == sizeof (long long) ? __LONG_LONG_MAX__ \
11 : __INTMAX_MAX__)
12 struct S { int a; char b[L]; };
14 void
15 foo (void)
17 struct S s; /* { dg-error "is too large" } */
18 asm volatile ("" : : "r" (&s));