On Mär 02 2017, Marek Polacek <pola...@redhat.com> wrote: > diff --git gcc/testsuite/g++.dg/Walloca1.C gcc/testsuite/g++.dg/Walloca1.C > index e69de29..23b97e8 100644 > --- gcc/testsuite/g++.dg/Walloca1.C > +++ gcc/testsuite/g++.dg/Walloca1.C > @@ -0,0 +1,6 @@ > +/* PR middle-end/79809 */ > +/* { dg-do compile } */ > +/* { dg-options "-Walloca-larger-than=4207115063 > -Wvla-larger-than=1233877270 -O2" } */ > + > +int a; > +char *b = static_cast<char *>(__builtin_alloca (a)); // { dg-warning > "argument to .alloca. may be too large" }
FAIL: g++.dg/Walloca1.C -std=gnu++11 (test for warnings, line 6) FAIL: g++.dg/Walloca1.C -std=gnu++11 (test for excess errors) Excess errors: /daten/aranym/gcc/gcc-20170308/gcc/testsuite/g++.dg/Walloca1.C:6:48: warning: unbounded use of 'alloca' [-Walloca-larger-than=] Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."