repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
other
/
large-size-array.C
blob
9614fb1253932e6ea934bfea222cdf67cd0525c2
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