OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
gcc/
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
other
/
large-size-array.C
1
/* { dg-do compile } */
2
#include <limits.h>
3
4
#ifdef __LP64__
5
#define DIM UINT_MAX>>1
6
#else
7
#define DIM USHRT_MAX>>1
8
#endif
9
10
int
11
sub (int *a)
12
{
13
return a[0];
14
}
15
16
int
17
main (void)
18
{
19
int a[DIM][DIM]; /* { dg-error "size of array 'a' is too large" } */
20
return sub (&a[0][0]); /* { dg-error "declared" } */
21
}
22
23