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
Pizza-lize :-)
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
other
/
large-size-array.C
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
15
sub (int *a)
16
{
17
return a[0];
18
}
19
20
int
21
main (void)
22
{
23
int a[DIM][DIM]; /* { dg-error "size of array 'a' is too large" } */
24
return sub (&a[0][0]); /* { dg-error "declared" } */
25
}
26
27