PR middle-end/27945
[official-gcc.git] / gcc / testsuite / gcc.dg / large-size-array-3.c
blob0b6149ba5a5e9144b582c502631b76598cac2756
1 /* { dg-do compile } */
2 #include <limits.h>
4 #ifdef __LP64__
5 #define DIM (UINT_MAX>>1)+1
6 #else
7 #define DIM 65536
8 #endif
10 int
11 sub (int *a)
13 return a[0];
16 int
17 main (void)
19 int a[DIM][DIM]; /* { dg-error "size of array 'a' is too large" } */
20 return sub (&a[0][0]);