libstdc++: Qualify calls in <bits/stl_uninitialized.h> to prevent ADL
[official-gcc.git] / gcc / testsuite / gcc.dg / pr42611.c
blobf502feac3371f3f309fb8f64e8b6f35cfa63244d
1 /* PR other/42611 */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
5 #define L \
6 (sizeof (__SIZE_TYPE__) == sizeof (void *) ? __INTPTR_MAX__ \
7 : sizeof (__SIZE_TYPE__) == 1 ? __SCHAR_MAX__ \
8 : sizeof (__SIZE_TYPE__) == sizeof (short) ? __SHRT_MAX__ \
9 : sizeof (__SIZE_TYPE__) == sizeof (int) ? __INT_MAX__ \
10 : sizeof (__SIZE_TYPE__) == sizeof (long) ? __LONG_MAX__ \
11 : sizeof (__SIZE_TYPE__) == sizeof (long long) ? __LONG_LONG_MAX__ \
12 : __INTMAX_MAX__)
13 struct S { int a; char b[L]; }; /* { dg-error "type .struct S. is too large" } */
15 void
16 foo (void)
18 struct S s; /* { dg-warning "size of .s. \[0-9\]+ bytes exceeds maximum object size \[0-9\]+" } */
19 asm volatile ("" : : "r" (&s));