Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/ext/vla12.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // VLA sizeof test |
2 // { dg-do compile } | |
3 // { dg-options "" } | |
131 | 4 // { dg-require-effective-target alloca } |
111 | 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 } |