OSDN Git Service

954e28e5fda8265c2fd7fe2b037498e3090b8d85
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / large-size-array-3.c
1 /* { dg-do compile } */
2
3 #ifdef __LP64__
4 #define DIM UINT_MAX>>1
5 #else
6 #define DIM 65536
7 #endif
8
9 int
10 sub (int *a)
11 {
12   return a[0];
13 }
14
15 int
16 main (void)
17 {
18   int a[DIM][DIM];  /* { dg-error "size of array 'a' is too large" } */
19   return sub (&a[0][0]);
20 }