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