libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / large-size-array.c
blob79e371f4a778a2a895c616ff04976218dc4a7aa7
1 /* { dg-do compile } */
2 #include <limits.h>
4 #if defined(__LP64__) || defined(_WIN64)
5 #define DIM UINT_MAX>>1
6 #else
7 #define DIM USHRT_MAX>>1
8 #endif
10 int
11 sub (int *a)
13 return a[0];
16 int
17 main (void)
19 int a[DIM][DIM]; /* { dg-error "exceeds maximum object size" } */
20 return sub (&a[0][0]);