[testsuite] Add dg-require-effective-target alloca for c++ test-cases

Message ID 1e4f7fb9-05c6-5ae8-a623-3b797f799bf8@mentor.com
State New
Headers show
Series
  • [testsuite] Add dg-require-effective-target alloca for c++ test-cases
Related show

Commit Message

Tom de Vries Jan. 12, 2018, 10:02 a.m.
Hi,

this patch adds dg-require-effective-target alloca for c++ test-cases.

Build and reg-tested on x86_64 and nvptx.

Committed as obvious.

Thanks,
- Tom

Patch

Add dg-require-effective-target alloca for c++ test-cases

2018-01-12  Tom de Vries  <tom@codesourcery.com>

	* c-c++-common/dwarf2/vla1.c: Add dg-require-effective-target alloca.
	* g++.dg/Walloca1.C: Same.
	* g++.dg/cpp0x/pr70338.C: Same.
	* g++.dg/cpp1y/lambda-generic-vla1.C: Same.
	* g++.dg/cpp1y/vla10.C: Same.
	* g++.dg/cpp1y/vla2.C: Same.
	* g++.dg/cpp1y/vla6.C: Same.
	* g++.dg/cpp1y/vla8.C: Same.
	* g++.dg/debug/debug5.C: Same.
	* g++.dg/debug/debug6.C: Same.
	* g++.dg/debug/pr54828.C: Same.
	* g++.dg/diagnostic/pr70105.C: Same.
	* g++.dg/eh/cleanup5.C: Same.
	* g++.dg/eh/spbp.C: Same.
	* g++.dg/ext/tmplattr9.C: Same.
	* g++.dg/ext/vla10.C: Same.
	* g++.dg/ext/vla11.C: Same.
	* g++.dg/ext/vla12.C: Same.
	* g++.dg/ext/vla15.C: Same.
	* g++.dg/ext/vla16.C: Same.
	* g++.dg/ext/vla17.C: Same.
	* g++.dg/ext/vla3.C: Same.
	* g++.dg/ext/vla6.C: Same.
	* g++.dg/ext/vla7.C: Same.
	* g++.dg/init/array24.C: Same.
	* g++.dg/init/new47.C: Same.
	* g++.dg/init/pr55497.C: Same.
	* g++.dg/opt/pr78201.C: Same.
	* g++.dg/template/vla2.C: Same.
	* g++.dg/torture/Wsizeof-pointer-memaccess1.C: Same.
	* g++.dg/torture/Wsizeof-pointer-memaccess2.C: Same.
	* g++.dg/torture/pr62127.C: Same.
	* g++.dg/torture/pr67055.C: Same.
	* g++.dg/torture/stackalign/eh-alloca-1.C: Same.
	* g++.dg/torture/stackalign/eh-inline-2.C: Same.
	* g++.dg/torture/stackalign/eh-vararg-1.C: Same.
	* g++.dg/torture/stackalign/eh-vararg-2.C: Same.
	* g++.dg/warn/Wplacement-new-size-5.C: Same.
	* g++.dg/warn/Wsizeof-pointer-memaccess-1.C: Same.
	* g++.dg/warn/Wvla-1.C: Same.
	* g++.dg/warn/Wvla-3.C: Same.
	* g++.old-deja/g++.ext/array2.C: Same.
	* g++.old-deja/g++.ext/constructor.C: Same.
	* g++.old-deja/g++.law/builtin1.C: Same.
	* g++.old-deja/g++.other/crash12.C: Same.
	* g++.old-deja/g++.other/eh3.C: Same.
	* g++.old-deja/g++.pt/array6.C: Same.
	* g++.old-deja/g++.pt/dynarray.C: Same.

---
 gcc/testsuite/c-c++-common/dwarf2/vla1.c                  | 1 +
 gcc/testsuite/g++.dg/Walloca1.C                           | 1 +
 gcc/testsuite/g++.dg/cpp0x/pr70338.C                      | 1 +
 gcc/testsuite/g++.dg/cpp1y/lambda-generic-vla1.C          | 1 +
 gcc/testsuite/g++.dg/cpp1y/vla10.C                        | 1 +
 gcc/testsuite/g++.dg/cpp1y/vla2.C                         | 1 +
 gcc/testsuite/g++.dg/cpp1y/vla6.C                         | 1 +
 gcc/testsuite/g++.dg/cpp1y/vla8.C                         | 1 +
 gcc/testsuite/g++.dg/debug/debug5.C                       | 1 +
 gcc/testsuite/g++.dg/debug/debug6.C                       | 1 +
 gcc/testsuite/g++.dg/debug/pr54828.C                      | 1 +
 gcc/testsuite/g++.dg/diagnostic/pr70105.C                 | 1 +
 gcc/testsuite/g++.dg/eh/cleanup5.C                        | 1 +
 gcc/testsuite/g++.dg/eh/spbp.C                            | 1 +
 gcc/testsuite/g++.dg/ext/tmplattr9.C                      | 1 +
 gcc/testsuite/g++.dg/ext/vla10.C                          | 1 +
 gcc/testsuite/g++.dg/ext/vla11.C                          | 1 +
 gcc/testsuite/g++.dg/ext/vla12.C                          | 1 +
 gcc/testsuite/g++.dg/ext/vla15.C                          | 1 +
 gcc/testsuite/g++.dg/ext/vla16.C                          | 1 +
 gcc/testsuite/g++.dg/ext/vla17.C                          | 1 +
 gcc/testsuite/g++.dg/ext/vla3.C                           | 1 +
 gcc/testsuite/g++.dg/ext/vla6.C                           | 1 +
 gcc/testsuite/g++.dg/ext/vla7.C                           | 1 +
 gcc/testsuite/g++.dg/init/array24.C                       | 1 +
 gcc/testsuite/g++.dg/init/new47.C                         | 1 +
 gcc/testsuite/g++.dg/init/pr55497.C                       | 1 +
 gcc/testsuite/g++.dg/opt/pr78201.C                        | 1 +
 gcc/testsuite/g++.dg/template/vla2.C                      | 1 +
 gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess1.C | 1 +
 gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess2.C | 1 +
 gcc/testsuite/g++.dg/torture/pr62127.C                    | 1 +
 gcc/testsuite/g++.dg/torture/pr67055.C                    | 1 +
 gcc/testsuite/g++.dg/torture/stackalign/eh-alloca-1.C     | 1 +
 gcc/testsuite/g++.dg/torture/stackalign/eh-inline-2.C     | 1 +
 gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-1.C     | 1 +
 gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-2.C     | 1 +
 gcc/testsuite/g++.dg/warn/Wplacement-new-size-5.C         | 1 +
 gcc/testsuite/g++.dg/warn/Wsizeof-pointer-memaccess-1.C   | 1 +
 gcc/testsuite/g++.dg/warn/Wvla-1.C                        | 1 +
 gcc/testsuite/g++.dg/warn/Wvla-3.C                        | 2 ++
 gcc/testsuite/g++.old-deja/g++.ext/array2.C               | 1 +
 gcc/testsuite/g++.old-deja/g++.ext/constructor.C          | 1 +
 gcc/testsuite/g++.old-deja/g++.law/builtin1.C             | 1 +
 gcc/testsuite/g++.old-deja/g++.other/crash12.C            | 1 +
 gcc/testsuite/g++.old-deja/g++.other/eh3.C                | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/array6.C                | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/dynarray.C              | 1 +
 48 files changed, 49 insertions(+)

diff --git a/gcc/testsuite/c-c++-common/dwarf2/vla1.c b/gcc/testsuite/c-c++-common/dwarf2/vla1.c
index e814bf5..f71f8f0 100644
--- a/gcc/testsuite/c-c++-common/dwarf2/vla1.c
+++ b/gcc/testsuite/c-c++-common/dwarf2/vla1.c
@@ -1,6 +1,7 @@ 
 // PR debug/42800
 // { dg-options "-gdwarf-2 -dA" }
 // { dg-final { scan-assembler "DW_AT_upper_bound" } }
+// { dg-require-effective-target alloca }
 
 int
 f (int i)
diff --git a/gcc/testsuite/g++.dg/Walloca1.C b/gcc/testsuite/g++.dg/Walloca1.C
index 818c6f0..b860a42 100644
--- a/gcc/testsuite/g++.dg/Walloca1.C
+++ b/gcc/testsuite/g++.dg/Walloca1.C
@@ -1,6 +1,7 @@ 
 /* PR middle-end/79809 */
 /* { dg-do compile } */
 /* { dg-options "-Walloca-larger-than=4207115063 -Wvla-larger-than=1233877270 -O2" } */
+/* { dg-require-effective-target alloca } */
 
 int a;
 char *b = static_cast<char *>(__builtin_alloca (a)); // { dg-warning "argument to .alloca. may be too large|unbounded use of" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr70338.C b/gcc/testsuite/g++.dg/cpp0x/pr70338.C
index 156cb91..0c5d50b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr70338.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr70338.C
@@ -1,6 +1,7 @@ 
 // PR c++/70338
 // { dg-do compile { target c++11 } }
 // { dg-options "-g" }
+// { dg-require-effective-target alloca }
 
 template<typename T>
 void
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-vla1.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-vla1.C
index 4cabccb..94d1860 100644
--- a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-vla1.C
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-vla1.C
@@ -1,6 +1,7 @@ 
 // PR c++/59271
 // { dg-do compile { target c++14 } }
 // { dg-options "-Wno-vla" }
+// { dg-require-effective-target alloca }
 
 extern "C" int printf (const char *, ...);
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla10.C b/gcc/testsuite/g++.dg/cpp1y/vla10.C
index f81ab9b..f4de532 100644
--- a/gcc/testsuite/g++.dg/cpp1y/vla10.C
+++ b/gcc/testsuite/g++.dg/cpp1y/vla10.C
@@ -1,6 +1,7 @@ 
 // PR c++/57402
 // { dg-do run }
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 
 int i = 2;
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla2.C b/gcc/testsuite/g++.dg/cpp1y/vla2.C
index 07c3008..010b54c 100644
--- a/gcc/testsuite/g++.dg/cpp1y/vla2.C
+++ b/gcc/testsuite/g++.dg/cpp1y/vla2.C
@@ -1,6 +1,7 @@ 
 // N3639 allows initialization and capture of VLAs
 // { dg-do run { target c++11 } }
 // { dg-options "-Wno-vla" }
+// { dg-require-effective-target alloca }
 
 void f(int n)
 {
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla6.C b/gcc/testsuite/g++.dg/cpp1y/vla6.C
index ca527a8..fc009cb 100644
--- a/gcc/testsuite/g++.dg/cpp1y/vla6.C
+++ b/gcc/testsuite/g++.dg/cpp1y/vla6.C
@@ -1,6 +1,7 @@ 
 // PR c++/57404
 // { dg-do compile { target c++11 } }
 // { dg-options "-g" }
+// { dg-require-effective-target alloca }
 
 void f (int i)
 {
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla8.C b/gcc/testsuite/g++.dg/cpp1y/vla8.C
index 68cafe5..43a7416 100644
--- a/gcc/testsuite/g++.dg/cpp1y/vla8.C
+++ b/gcc/testsuite/g++.dg/cpp1y/vla8.C
@@ -1,6 +1,7 @@ 
 // PR c++/55149
 // { dg-do compile { target c++11 } }
 // { dg-options "-Wno-vla" }
+// { dg-require-effective-target alloca }
 
 template<unsigned int TA>
  struct SA
diff --git a/gcc/testsuite/g++.dg/debug/debug5.C b/gcc/testsuite/g++.dg/debug/debug5.C
index 8dffa94..efed28c 100644
--- a/gcc/testsuite/g++.dg/debug/debug5.C
+++ b/gcc/testsuite/g++.dg/debug/debug5.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile }
+// { dg-require-effective-target alloca }
 
 int foo()
 {
diff --git a/gcc/testsuite/g++.dg/debug/debug6.C b/gcc/testsuite/g++.dg/debug/debug6.C
index 64f121b..3622d01 100644
--- a/gcc/testsuite/g++.dg/debug/debug6.C
+++ b/gcc/testsuite/g++.dg/debug/debug6.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile }
+// { dg-require-effective-target alloca }
 
 void foo()
 {
diff --git a/gcc/testsuite/g++.dg/debug/pr54828.C b/gcc/testsuite/g++.dg/debug/pr54828.C
index 80b9a3c..81c44de 100644
--- a/gcc/testsuite/g++.dg/debug/pr54828.C
+++ b/gcc/testsuite/g++.dg/debug/pr54828.C
@@ -1,6 +1,7 @@ 
 // PR debug/54828
 // { dg-do compile }
 // { dg-options "-g" }
+// { dg-require-effective-target alloca }
 
 struct T { T (); virtual ~T (); };
 struct S : public virtual T { S (); virtual ~S (); };
diff --git a/gcc/testsuite/g++.dg/diagnostic/pr70105.C b/gcc/testsuite/g++.dg/diagnostic/pr70105.C
index 9c9b02c..55d5597 100644
--- a/gcc/testsuite/g++.dg/diagnostic/pr70105.C
+++ b/gcc/testsuite/g++.dg/diagnostic/pr70105.C
@@ -1,4 +1,5 @@ 
 // { dg-options "-Wsequence-point -fdiagnostics-show-caret" }
+// { dg-require-effective-target alloca }
 
 void *libiberty_concat_ptr;
 extern unsigned long concat_length (const char *, ...);
diff --git a/gcc/testsuite/g++.dg/eh/cleanup5.C b/gcc/testsuite/g++.dg/eh/cleanup5.C
index e74d067..79aa321 100644
--- a/gcc/testsuite/g++.dg/eh/cleanup5.C
+++ b/gcc/testsuite/g++.dg/eh/cleanup5.C
@@ -1,6 +1,7 @@ 
 // PR 17907
 // { dg-do compile }
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 // We lost a CLEANUP_POINT_EXPR, leading to a crash destroying temp of A.
 
 
diff --git a/gcc/testsuite/g++.dg/eh/spbp.C b/gcc/testsuite/g++.dg/eh/spbp.C
index 2440605..6f228f2 100644
--- a/gcc/testsuite/g++.dg/eh/spbp.C
+++ b/gcc/testsuite/g++.dg/eh/spbp.C
@@ -1,6 +1,7 @@ 
 /* { dg-do run } */
 /* { dg-options "-gdwarf-2" } */
 /* { dg-skip-if "No Dwarf" { { *-*-aix* hppa*-*-hpux* } && { ! hppa*64*-*-* } } } */
+/* { dg-require-effective-target alloca } */
 
 /* This was a bug on x86-darwin, where the register numbering for SP
    and BP was swapped (it's easy to do because on that port it's
diff --git a/gcc/testsuite/g++.dg/ext/tmplattr9.C b/gcc/testsuite/g++.dg/ext/tmplattr9.C
index 090257a..c72e98e 100644
--- a/gcc/testsuite/g++.dg/ext/tmplattr9.C
+++ b/gcc/testsuite/g++.dg/ext/tmplattr9.C
@@ -1,6 +1,7 @@ 
 // PR c++/34937, 34962
 // { dg-require-weak "" }
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/ext/vla10.C b/gcc/testsuite/g++.dg/ext/vla10.C
index 17cdb2f..b48b173 100644
--- a/gcc/testsuite/g++.dg/ext/vla10.C
+++ b/gcc/testsuite/g++.dg/ext/vla10.C
@@ -1,5 +1,6 @@ 
 // PR c++/48446
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 
 template<typename T>
 struct A
diff --git a/gcc/testsuite/g++.dg/ext/vla11.C b/gcc/testsuite/g++.dg/ext/vla11.C
index e733f48..9e0f203 100644
--- a/gcc/testsuite/g++.dg/ext/vla11.C
+++ b/gcc/testsuite/g++.dg/ext/vla11.C
@@ -1,6 +1,7 @@ 
 // Test that auto works with VLAs.
 // { dg-do compile { target c++11 } }
 // { dg-options "-Wno-vla" }
+// { dg-require-effective-target alloca }
 
 void bar(int n)
 {
diff --git a/gcc/testsuite/g++.dg/ext/vla12.C b/gcc/testsuite/g++.dg/ext/vla12.C
index bca8365..ad52daf 100644
--- a/gcc/testsuite/g++.dg/ext/vla12.C
+++ b/gcc/testsuite/g++.dg/ext/vla12.C
@@ -1,6 +1,7 @@ 
 // VLA sizeof test
 // { dg-do compile }
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 
 int
 f1 (int i)
diff --git a/gcc/testsuite/g++.dg/ext/vla15.C b/gcc/testsuite/g++.dg/ext/vla15.C
index feeb49f..77436cb 100644
--- a/gcc/testsuite/g++.dg/ext/vla15.C
+++ b/gcc/testsuite/g++.dg/ext/vla15.C
@@ -1,6 +1,7 @@ 
 // PR c++/44613
 // { dg-do run }
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 
 void *volatile p;
 
diff --git a/gcc/testsuite/g++.dg/ext/vla16.C b/gcc/testsuite/g++.dg/ext/vla16.C
index fa51fee..4caa33c 100644
--- a/gcc/testsuite/g++.dg/ext/vla16.C
+++ b/gcc/testsuite/g++.dg/ext/vla16.C
@@ -1,5 +1,6 @@ 
 // PR c++/72766
 // { dg-options "-Wno-vla" }
+// { dg-require-effective-target alloca }
 
 long fn1() {
   const int a = fn1();
diff --git a/gcc/testsuite/g++.dg/ext/vla17.C b/gcc/testsuite/g++.dg/ext/vla17.C
index 431167c..3c2dbff 100644
--- a/gcc/testsuite/g++.dg/ext/vla17.C
+++ b/gcc/testsuite/g++.dg/ext/vla17.C
@@ -1,6 +1,7 @@ 
 // PR c++/69487
 // { dg-do run }
 // { dg-options -Wno-vla }
+// { dg-require-effective-target alloca }
 
 int size = 6;
 
diff --git a/gcc/testsuite/g++.dg/ext/vla3.C b/gcc/testsuite/g++.dg/ext/vla3.C
index 329cc7d..5452280 100644
--- a/gcc/testsuite/g++.dg/ext/vla3.C
+++ b/gcc/testsuite/g++.dg/ext/vla3.C
@@ -1,5 +1,6 @@ 
 // PR c++/28903
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 
 template <class>
 struct View 
diff --git a/gcc/testsuite/g++.dg/ext/vla6.C b/gcc/testsuite/g++.dg/ext/vla6.C
index 83011f2..687e0bc 100644
--- a/gcc/testsuite/g++.dg/ext/vla6.C
+++ b/gcc/testsuite/g++.dg/ext/vla6.C
@@ -1,5 +1,6 @@ 
 // PR c++/28879
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/ext/vla7.C b/gcc/testsuite/g++.dg/ext/vla7.C
index 5246f9c..1a97ac0 100644
--- a/gcc/testsuite/g++.dg/ext/vla7.C
+++ b/gcc/testsuite/g++.dg/ext/vla7.C
@@ -1,5 +1,6 @@ 
 // PR c++/40013
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 
 template <class T>
 struct A
diff --git a/gcc/testsuite/g++.dg/init/array24.C b/gcc/testsuite/g++.dg/init/array24.C
index 2d72df4..b38033f 100644
--- a/gcc/testsuite/g++.dg/init/array24.C
+++ b/gcc/testsuite/g++.dg/init/array24.C
@@ -1,5 +1,6 @@ 
 // PR c++/29175
 // { dg-options "-Wno-vla" }
+// { dg-require-effective-target alloca }
 
 void foo(int i)
 {
diff --git a/gcc/testsuite/g++.dg/init/new47.C b/gcc/testsuite/g++.dg/init/new47.C
index acd52d7..fadc4d9 100644
--- a/gcc/testsuite/g++.dg/init/new47.C
+++ b/gcc/testsuite/g++.dg/init/new47.C
@@ -1,6 +1,7 @@ 
 // PR c++/70448
 // { dg-do compile }
 // { dg-options "-Wall" }
+// { dg-require-effective-target alloca }
 
 typedef __typeof__ (sizeof 0) size_t;
 void *operator new (size_t, void *p) { return p; }
diff --git a/gcc/testsuite/g++.dg/init/pr55497.C b/gcc/testsuite/g++.dg/init/pr55497.C
index b50f3fb..4d1eb74 100644
--- a/gcc/testsuite/g++.dg/init/pr55497.C
+++ b/gcc/testsuite/g++.dg/init/pr55497.C
@@ -1,5 +1,6 @@ 
 // PR c++/55497
 // { dg-options "-g" }
+// { dg-require-effective-target alloca }
 
 int get();
 
diff --git a/gcc/testsuite/g++.dg/opt/pr78201.C b/gcc/testsuite/g++.dg/opt/pr78201.C
index 82567bc..e2f2c14 100644
--- a/gcc/testsuite/g++.dg/opt/pr78201.C
+++ b/gcc/testsuite/g++.dg/opt/pr78201.C
@@ -1,6 +1,7 @@ 
 // PR middle-end/78201
 // { dg-do compile }
 // { dg-options "-O2" }
+// { dg-require-effective-target alloca }
 
 struct B { long d (); } *c;
 long e;
diff --git a/gcc/testsuite/g++.dg/template/vla2.C b/gcc/testsuite/g++.dg/template/vla2.C
index 183f8fa..dcd384b 100644
--- a/gcc/testsuite/g++.dg/template/vla2.C
+++ b/gcc/testsuite/g++.dg/template/vla2.C
@@ -1,6 +1,7 @@ 
 // PR c++/28879
 // { dg-do compile }
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess1.C b/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess1.C
index 16340eb..635d5f4 100644
--- a/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess1.C
+++ b/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess1.C
@@ -4,6 +4,7 @@ 
 // Test just twice, once with -O0 non-fortified, once with -O2 fortified.
 // { dg-skip-if "" { *-*-* }  { "*" } { "-O0" "-O2" } }
 // { dg-skip-if "" { *-*-* }  { "-flto" } { "" } }
+// { dg-require-effective-target alloca }
 
 extern "C" {
 
diff --git a/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess2.C b/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess2.C
index 2dff8f0..b566c2a 100644
--- a/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess2.C
+++ b/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess2.C
@@ -5,6 +5,7 @@ 
 // suppressing buffer overflow warnings.
 // { dg-skip-if "" { *-*-* }  { "*" } { "-O0" "-O2" } }
 // { dg-skip-if "" { *-*-* }  { "-flto" } { "" } }
+// { dg-require-effective-target alloca }
 
 extern "C" {
 
diff --git a/gcc/testsuite/g++.dg/torture/pr62127.C b/gcc/testsuite/g++.dg/torture/pr62127.C
index 7b83a26..fe5d439 100644
--- a/gcc/testsuite/g++.dg/torture/pr62127.C
+++ b/gcc/testsuite/g++.dg/torture/pr62127.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile }
+// { dg-require-effective-target alloca }
 struct A
 {
   A(int);
diff --git a/gcc/testsuite/g++.dg/torture/pr67055.C b/gcc/testsuite/g++.dg/torture/pr67055.C
index 6621e58..5089f09 100644
--- a/gcc/testsuite/g++.dg/torture/pr67055.C
+++ b/gcc/testsuite/g++.dg/torture/pr67055.C
@@ -1,5 +1,6 @@ 
 // { dg-do compile }
 // { dg-additional-options "-std=c++14" }
+// { dg-require-effective-target alloca }
 
 namespace std {
     typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/g++.dg/torture/stackalign/eh-alloca-1.C b/gcc/testsuite/g++.dg/torture/stackalign/eh-alloca-1.C
index 02693c0..dd8c365 100644
--- a/gcc/testsuite/g++.dg/torture/stackalign/eh-alloca-1.C
+++ b/gcc/testsuite/g++.dg/torture/stackalign/eh-alloca-1.C
@@ -1,5 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } } */
+/* { dg-require-effective-target alloca } */
 
 #include "check.h"
 
diff --git a/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-2.C b/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-2.C
index e630f33..1bf52d3 100644
--- a/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-2.C
+++ b/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-2.C
@@ -1,5 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } } */
+/* { dg-require-effective-target alloca } */
 
 #include "check.h"
 
diff --git a/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-1.C b/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-1.C
index efee8bb..d0611dc 100644
--- a/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-1.C
+++ b/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-1.C
@@ -1,5 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } } */
+/* { dg-require-effective-target alloca } */
 
 #include <stdarg.h>
 #include "check.h"
diff --git a/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-2.C b/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-2.C
index d324383..684fadb 100644
--- a/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-2.C
+++ b/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-2.C
@@ -1,6 +1,7 @@ 
 /* { dg-options "-Wno-abi" {target arm_eabi} } */
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } } */
+/* { dg-require-effective-target alloca } */
 
 #include <stdarg.h>
 #include "check.h"
diff --git a/gcc/testsuite/g++.dg/warn/Wplacement-new-size-5.C b/gcc/testsuite/g++.dg/warn/Wplacement-new-size-5.C
index 178d737..0bed577 100644
--- a/gcc/testsuite/g++.dg/warn/Wplacement-new-size-5.C
+++ b/gcc/testsuite/g++.dg/warn/Wplacement-new-size-5.C
@@ -2,6 +2,7 @@ 
 // warn_placement_new_too_small
 // { dg-do compile }
 // { dg-additional-options "-Wplacement-new -Wno-pedantic" }
+// { dg-require-effective-target alloca }
 
 #define SIZE_MAX   __SIZE_MAX__
 #define DIFF_MAX   __PTRDIFF_MAX__
diff --git a/gcc/testsuite/g++.dg/warn/Wsizeof-pointer-memaccess-1.C b/gcc/testsuite/g++.dg/warn/Wsizeof-pointer-memaccess-1.C
index 798cb6d..18aa90b 100644
--- a/gcc/testsuite/g++.dg/warn/Wsizeof-pointer-memaccess-1.C
+++ b/gcc/testsuite/g++.dg/warn/Wsizeof-pointer-memaccess-1.C
@@ -1,6 +1,7 @@ 
 // Test -Wsizeof-pointer-memaccess warnings.
 // { dg-do compile }
 // { dg-options "-Wall -Wno-sizeof-array-argument" }
+// { dg-require-effective-target alloca }
 
 typedef __SIZE_TYPE__ size_t;
 extern "C" void *memset (void *, int, size_t);
diff --git a/gcc/testsuite/g++.dg/warn/Wvla-1.C b/gcc/testsuite/g++.dg/warn/Wvla-1.C
index ca3669a..5d261fc 100644
--- a/gcc/testsuite/g++.dg/warn/Wvla-1.C
+++ b/gcc/testsuite/g++.dg/warn/Wvla-1.C
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-Wvla" } */
+/* { dg-require-effective-target alloca } */
 
 void func (int i)
 {
diff --git a/gcc/testsuite/g++.dg/warn/Wvla-3.C b/gcc/testsuite/g++.dg/warn/Wvla-3.C
index 259c576..fcfb0da 100644
--- a/gcc/testsuite/g++.dg/warn/Wvla-3.C
+++ b/gcc/testsuite/g++.dg/warn/Wvla-3.C
@@ -1,5 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-pedantic-errors -Wno-vla" } */
+/* { dg-require-effective-target alloca } */
+/* { dg-require-effective-target alloca } */
 
 void func (int i)
 {
diff --git a/gcc/testsuite/g++.old-deja/g++.ext/array2.C b/gcc/testsuite/g++.old-deja/g++.ext/array2.C
index 88482fe..527239f 100644
--- a/gcc/testsuite/g++.old-deja/g++.ext/array2.C
+++ b/gcc/testsuite/g++.old-deja/g++.ext/array2.C
@@ -1,5 +1,6 @@ 
 // { dg-do assemble  }
 // { dg-options "-w" }
+// { dg-require-effective-target alloca }
 // This testcase used to cause a crash on the Alpha.
 
 struct A {
diff --git a/gcc/testsuite/g++.old-deja/g++.ext/constructor.C b/gcc/testsuite/g++.old-deja/g++.ext/constructor.C
index 3dc15c5..2ee6b34 100644
--- a/gcc/testsuite/g++.old-deja/g++.ext/constructor.C
+++ b/gcc/testsuite/g++.old-deja/g++.ext/constructor.C
@@ -1,5 +1,6 @@ 
 // { dg-do run  }
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 // Testcase for constructor expressions (GNU extension)
 
 struct Any {
diff --git a/gcc/testsuite/g++.old-deja/g++.law/builtin1.C b/gcc/testsuite/g++.old-deja/g++.law/builtin1.C
index de22864..cc4cc87 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/builtin1.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/builtin1.C
@@ -1,5 +1,6 @@ 
 // { dg-do run  }
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 // GROUPS passed builtins
 // Apparently not in g++ bug snapshot (was originally sent to bug-gcc)
 // Message-Id: <m0p74Fh-0002fCC@neal.ctd.comsat.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash12.C b/gcc/testsuite/g++.old-deja/g++.other/crash12.C
index 73bbb8b..4639e76 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/crash12.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash12.C
@@ -1,5 +1,6 @@ 
 // { dg-do assemble  }
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 // Origin: Alfred Minarik <a8601248@unet.univie.ac.at>
 
 template<typename T>
diff --git a/gcc/testsuite/g++.old-deja/g++.other/eh3.C b/gcc/testsuite/g++.old-deja/g++.other/eh3.C
index 4e61892..497cfde 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/eh3.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/eh3.C
@@ -1,5 +1,6 @@ 
 // { dg-do run  }
 // { dg-options "-O" }
+// { dg-require-effective-target alloca }
 typedef struct { } e;
 
 char *p;
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/array6.C b/gcc/testsuite/g++.old-deja/g++.pt/array6.C
index b48cabd..4d00d04 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/array6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/array6.C
@@ -1,5 +1,6 @@ 
 // { dg-do assemble  }
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 // Origin: Alfred Minarik <a8601248@unet.univie.ac.at>
 
 template<typename _CharT>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/dynarray.C b/gcc/testsuite/g++.old-deja/g++.pt/dynarray.C
index 7376f91..7817a73 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/dynarray.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/dynarray.C
@@ -1,5 +1,6 @@ 
 // { dg-do assemble  }
 // { dg-options "" }
+// { dg-require-effective-target alloca }
 // Origin: Theo Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
 
 inline const unsigned& f(unsigned const& a) {