From 4128794538b95f791d4dcb5c00d1c8e57ae9f6c0 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Fri, 12 Jan 2018 10:02:45 +0000 Subject: [PATCH] Add dg-require-effective-target alloca for c++ test-cases 2018-01-12 Tom de Vries * 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. From-SVN: r256570 --- gcc/testsuite/ChangeLog | 51 +++++++++++++++++++ gcc/testsuite/c-c++-common/dwarf2/vla1.c | 1 + gcc/testsuite/g++.dg/Walloca1.C | 1 + gcc/testsuite/g++.dg/cpp0x/pr70338.C | 1 + .../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 + .../torture/Wsizeof-pointer-memaccess1.C | 1 + .../torture/Wsizeof-pointer-memaccess2.C | 1 + gcc/testsuite/g++.dg/torture/pr62127.C | 1 + gcc/testsuite/g++.dg/torture/pr67055.C | 1 + .../g++.dg/torture/stackalign/eh-alloca-1.C | 1 + .../g++.dg/torture/stackalign/eh-inline-2.C | 1 + .../g++.dg/torture/stackalign/eh-vararg-1.C | 1 + .../g++.dg/torture/stackalign/eh-vararg-2.C | 1 + .../g++.dg/warn/Wplacement-new-size-5.C | 1 + .../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 + .../g++.old-deja/g++.ext/constructor.C | 1 + gcc/testsuite/g++.old-deja/g++.law/builtin1.C | 1 + .../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 + 49 files changed, 100 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4b7acfa3837..5ee13071f9b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,54 @@ +2018-01-12 Tom de Vries + + * 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. + 2018-01-12 Rainer Orth * g++.dg/cpp0x/inh-ctor30.C: Allow for alternate mangled form. diff --git a/gcc/testsuite/c-c++-common/dwarf2/vla1.c b/gcc/testsuite/c-c++-common/dwarf2/vla1.c index e814bf56844..f71f8f0a1fe 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 818c6f0697e..b860a4286c2 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(__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 156cb917080..0c5d50b17d5 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 void diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-vla1.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-vla1.C index 4cabccb27b7..94d18605057 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 f81ab9bd1cd..f4de532137e 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 07c300884a3..010b54cd41c 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 ca527a84c7b..fc009cbea18 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 68cafe585e9..43a7416e5c4 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 struct SA diff --git a/gcc/testsuite/g++.dg/debug/debug5.C b/gcc/testsuite/g++.dg/debug/debug5.C index 8dffa94874e..efed28c2505 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 64f121b00ad..3622d0194de 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 80b9a3ce070..81c44debf33 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 9c9b02c77f4..55d55973204 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 e74d06793ae..79aa32100b9 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 244060562fe..6f228f28c49 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 090257a5f91..c72e98ee459 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 17cdb2f9f76..b48b17327be 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 struct A diff --git a/gcc/testsuite/g++.dg/ext/vla11.C b/gcc/testsuite/g++.dg/ext/vla11.C index e733f481f3e..9e0f203649a 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 bca836507a9..ad52daf5b2e 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 feeb49ff280..77436cb58f3 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 fa51feed8f3..4caa33c1633 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 431167cb48e..3c2dbff4c26 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 329cc7dde00..5452280d6f2 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 struct View diff --git a/gcc/testsuite/g++.dg/ext/vla6.C b/gcc/testsuite/g++.dg/ext/vla6.C index 83011f2f0ab..687e0bcf290 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 5246f9c8c38..1a97ac015bf 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 struct A diff --git a/gcc/testsuite/g++.dg/init/array24.C b/gcc/testsuite/g++.dg/init/array24.C index 2d72df40382..b38033f4567 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 acd52d7993b..fadc4d98ab5 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 b50f3fbdfb9..4d1eb746a21 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 82567bc505b..e2f2c14366e 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 183f8fadc0e..dcd384b265d 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 16340ebf73f..635d5f40ef7 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 2dff8f0bc92..b566c2aa52d 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 7b83a264413..fe5d4395683 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 6621e58136f..5089f092861 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 02693c04d4b..dd8c365864b 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 e630f338c54..1bf52d37670 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 efee8bb9e95..d0611dc5681 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 #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 d324383e263..684fadbe830 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 #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 178d7375270..0bed5771531 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 798cb6de044..18aa90bede4 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 ca3669aec99..5d261fcf813 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 259c576b29f..fcfb0da902f 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 88482fe19d9..527239f1ee3 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 3dc15c52acd..2ee6b349621 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 de228642250..cc4cc87d727 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: diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash12.C b/gcc/testsuite/g++.old-deja/g++.other/crash12.C index 73bbb8bb6d6..4639e764a25 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 template diff --git a/gcc/testsuite/g++.old-deja/g++.other/eh3.C b/gcc/testsuite/g++.old-deja/g++.other/eh3.C index 4e618928286..497cfde2f34 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 b48cabd4da9..4d00d046305 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 template diff --git a/gcc/testsuite/g++.old-deja/g++.pt/dynarray.C b/gcc/testsuite/g++.old-deja/g++.pt/dynarray.C index 7376f9165bf..7817a73b119 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 inline const unsigned& f(unsigned const& a) { -- 2.30.2