Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/large-size-array.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 1830386684a0 |
line wrap: on
line source
/* { dg-do compile } */ #include <limits.h> #if defined(__LP64__) || defined(_WIN64) #define DIM UINT_MAX>>1 #else #define DIM USHRT_MAX>>1 #endif int sub (int *a) { return a[0]; } int main (void) { int a[DIM][DIM]; /* { dg-error "size of array 'a' is too large" } */ return sub (&a[0][0]); }