1 /* { dg-do compile } */ 2 #include <limits.h> 3 4 #ifdef _WIN64 5 #define DIM ULLONG_MAX>>1 6 #else 7 #ifdef __LP64__ 8 #define DIM UINT_MAX>>1 9 #else 10 #define DIM USHRT_MAX>>1 11 #endif 12 #endif 13 14 int sub(int * a)15sub (int *a) 16 { 17 return a[0]; 18 } 19 20 int main(void)21main (void) 22 { 23 int a[DIM][DIM]; /* { dg-error "7:exceeds maximum object size" } */ 24 return sub (&a[0][0]); /* { dg-error "declared" } */ 25 } 26 27 28