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
fortran/openmp.cc: Fix var init and locus use to avoid uninit values [PR fortran...
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
vla2.C
blob
010b54cd41c6379aa20c514d27eb3f9ab2d31016
1
// N3639 allows initialization and capture of VLAs
2
// { dg-do run { target c++11 } }
3
// { dg-options "-Wno-vla" }
4
// { dg-require-effective-target alloca }
5
6
void f(int n)
7
{
8
int ar[n] = { 42 };
9
auto l = [&] { return ar[0]; };
10
if (l() != 42) __builtin_abort ();
11
}
12
13
int main()
14
{
15
f(1);
16
}