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
PR c++/85553
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ext
/
vla12.C
blob
ad52daf5b2ea86324aa904d799e1f87036c917a5
1
// VLA sizeof test
2
// { dg-do compile }
3
// { dg-options "" }
4
// { dg-require-effective-target alloca }
5
6
int
7
f1 (int i)
8
{
9
char a[sizeof (i) + 6 + i];
10
char b[sizeof (a) + 1];
11
return sizeof (b);
12
}
13
14
int
15
f2 (int i)
16
{
17
char a[sizeof (i) + 6 + i];
18
char b[sizeof (a)];
19
return sizeof (b);
20
}
21
22
int
23
f3 (int i)
24
{
25
char a[sizeof (i) + 6 + i];
26
char b[sizeof (i) + i];
27
char c[sizeof (a) + sizeof (b) + 7];
28
return sizeof (c);
29
}