From: Tom de Vries Date: Fri, 24 Mar 2017 06:28:12 +0000 (+0000) Subject: Add missing dg-require-effective-target alloca in gcc testsuite X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=90e0269253c2cb5241f07e33a80fa573ba9395fa;p=gcc.git Add missing dg-require-effective-target alloca in gcc testsuite 2017-03-24 Tom de Vries PR testsuite/80092 * gcc.dg/Walloca-7.c: Add dg-require-effective-target alloca. * gcc.dg/Walloca-12.c: Same. * gcc.dg/attr-alloc_size-8.c: Same. * gcc.dg/Walloca-4.c: Same. * gcc.dg/Walloca-8.c: Same. * gcc.dg/Walloca-13.c: Same. * gcc.dg/Walloca-14.c: Same. * gcc.dg/attr-alloc_size-9.c: Same. * gcc.dg/Walloca-1.c: Same. * gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Same. * gcc.dg/Walloca-5.c: Same. * gcc.dg/Walloca-10.c: Same. * gcc.dg/Walloca-9.c: Same. * gcc.dg/attr-alloc_size-6.c: Same. * gcc.dg/Wvla-larger-than-1.c: Same. * gcc.dg/torture/pr71881.c: Same. * gcc.dg/torture/pr71901.c: Same. * gcc.dg/torture/pr78742.c: Same. * gcc.dg/builtin-alloc-size.c: Same. * gcc.dg/Walloca-2.c: Same. * gcc.dg/Walloca-6.c: Same. * gcc.dg/Walloca-11.c: Same. * gcc.dg/attr-alloc_size-7.c: Same. * gcc.dg/Wvla-larger-than-2.c: Same. * gcc.dg/Walloca-3.c: Same. * c-c++-common/Wimplicit-fallthrough-7.c: Same. * gcc.c-torture/compile/pr79413.c: Same. * gcc.c-torture/compile/pr78439.c: Same. From-SVN: r246433 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 195552897f0..9f468464cef 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,35 @@ +2017-03-24 Tom de Vries + + PR testsuite/80092 + * gcc.dg/Walloca-7.c: Add dg-require-effective-target alloca. + * gcc.dg/Walloca-12.c: Same. + * gcc.dg/attr-alloc_size-8.c: Same. + * gcc.dg/Walloca-4.c: Same. + * gcc.dg/Walloca-8.c: Same. + * gcc.dg/Walloca-13.c: Same. + * gcc.dg/Walloca-14.c: Same. + * gcc.dg/attr-alloc_size-9.c: Same. + * gcc.dg/Walloca-1.c: Same. + * gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Same. + * gcc.dg/Walloca-5.c: Same. + * gcc.dg/Walloca-10.c: Same. + * gcc.dg/Walloca-9.c: Same. + * gcc.dg/attr-alloc_size-6.c: Same. + * gcc.dg/Wvla-larger-than-1.c: Same. + * gcc.dg/torture/pr71881.c: Same. + * gcc.dg/torture/pr71901.c: Same. + * gcc.dg/torture/pr78742.c: Same. + * gcc.dg/builtin-alloc-size.c: Same. + * gcc.dg/Walloca-2.c: Same. + * gcc.dg/Walloca-6.c: Same. + * gcc.dg/Walloca-11.c: Same. + * gcc.dg/attr-alloc_size-7.c: Same. + * gcc.dg/Wvla-larger-than-2.c: Same. + * gcc.dg/Walloca-3.c: Same. + * c-c++-common/Wimplicit-fallthrough-7.c: Same. + * gcc.c-torture/compile/pr79413.c: Same. + * gcc.c-torture/compile/pr78439.c: Same. + 2017-03-23 Kelvin Nilsen * gcc.target/powerpc/p9-options-1.c: New test. diff --git a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c index 898e5fa6d46..1adf53b3850 100644 --- a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c +++ b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c @@ -1,5 +1,6 @@ /* PR c/7652 */ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Wimplicit-fallthrough" } */ extern void bar (int); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr78439.c b/gcc/testsuite/gcc.c-torture/compile/pr78439.c index a8af86bca34..fc90dd9c766 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr78439.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr78439.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ /* PR target/78439. */ enum demangle_component_type diff --git a/gcc/testsuite/gcc.c-torture/compile/pr79413.c b/gcc/testsuite/gcc.c-torture/compile/pr79413.c index 602a974c9be..6fc66d5ce30 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr79413.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr79413.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ /* PR c/79413 */ void diff --git a/gcc/testsuite/gcc.dg/Walloca-1.c b/gcc/testsuite/gcc.dg/Walloca-1.c index 1a516f0a59d..d98a142e9b0 100644 --- a/gcc/testsuite/gcc.dg/Walloca-1.c +++ b/gcc/testsuite/gcc.dg/Walloca-1.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=2000 -O2" } */ #define alloca __builtin_alloca diff --git a/gcc/testsuite/gcc.dg/Walloca-10.c b/gcc/testsuite/gcc.dg/Walloca-10.c index 69549fcc0d5..6b127cce2a2 100644 --- a/gcc/testsuite/gcc.dg/Walloca-10.c +++ b/gcc/testsuite/gcc.dg/Walloca-10.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=2000 -O2" } */ // Test when the conditionals are incorrectly reversed. diff --git a/gcc/testsuite/gcc.dg/Walloca-11.c b/gcc/testsuite/gcc.dg/Walloca-11.c index 5124476d71f..8484f9c7782 100644 --- a/gcc/testsuite/gcc.dg/Walloca-11.c +++ b/gcc/testsuite/gcc.dg/Walloca-11.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca -O2" } */ // Make sure we don't warn on VLA with -Walloca. diff --git a/gcc/testsuite/gcc.dg/Walloca-12.c b/gcc/testsuite/gcc.dg/Walloca-12.c index 5d71cda8e51..059c5f32129 100644 --- a/gcc/testsuite/gcc.dg/Walloca-12.c +++ b/gcc/testsuite/gcc.dg/Walloca-12.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=128 -O2" } */ void f (void*); diff --git a/gcc/testsuite/gcc.dg/Walloca-13.c b/gcc/testsuite/gcc.dg/Walloca-13.c index f9bdcefa9d3..d3af0c50399 100644 --- a/gcc/testsuite/gcc.dg/Walloca-13.c +++ b/gcc/testsuite/gcc.dg/Walloca-13.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=100 -O2" } */ void f (void*); diff --git a/gcc/testsuite/gcc.dg/Walloca-14.c b/gcc/testsuite/gcc.dg/Walloca-14.c index 6ff2e7f29c5..723dbe5081a 100644 --- a/gcc/testsuite/gcc.dg/Walloca-14.c +++ b/gcc/testsuite/gcc.dg/Walloca-14.c @@ -1,5 +1,6 @@ /* PR tree-optimization/80109 */ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-O2 -Walloca-larger-than=126812070" } */ void diff --git a/gcc/testsuite/gcc.dg/Walloca-2.c b/gcc/testsuite/gcc.dg/Walloca-2.c index 4695fda400b..5ba9711d299 100644 --- a/gcc/testsuite/gcc.dg/Walloca-2.c +++ b/gcc/testsuite/gcc.dg/Walloca-2.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=2000 -O2" } */ void f (void *); diff --git a/gcc/testsuite/gcc.dg/Walloca-3.c b/gcc/testsuite/gcc.dg/Walloca-3.c index 5345197eba8..f5840673da0 100644 --- a/gcc/testsuite/gcc.dg/Walloca-3.c +++ b/gcc/testsuite/gcc.dg/Walloca-3.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=2000 -O2" } */ void f (void *); diff --git a/gcc/testsuite/gcc.dg/Walloca-4.c b/gcc/testsuite/gcc.dg/Walloca-4.c index a559534acaa..85dcb7b9bb9 100644 --- a/gcc/testsuite/gcc.dg/Walloca-4.c +++ b/gcc/testsuite/gcc.dg/Walloca-4.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=5000 -O2" } */ char * diff --git a/gcc/testsuite/gcc.dg/Walloca-5.c b/gcc/testsuite/gcc.dg/Walloca-5.c index 5ed1171e0d3..73c72960c26 100644 --- a/gcc/testsuite/gcc.dg/Walloca-5.c +++ b/gcc/testsuite/gcc.dg/Walloca-5.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=123 -O2" } */ /* { dg-xfail-if "Currently broken but Andrew's work should fix this" { *-*-* } } */ diff --git a/gcc/testsuite/gcc.dg/Walloca-6.c b/gcc/testsuite/gcc.dg/Walloca-6.c index b4d8d41b062..16b5d6f729d 100644 --- a/gcc/testsuite/gcc.dg/Walloca-6.c +++ b/gcc/testsuite/gcc.dg/Walloca-6.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=256 -O2" } */ /* { dg-xfail-if "Currently broken but Andrew's work should fix this" { *-*-* } } */ diff --git a/gcc/testsuite/gcc.dg/Walloca-7.c b/gcc/testsuite/gcc.dg/Walloca-7.c index d6581a5b20b..11c38c18fd6 100644 --- a/gcc/testsuite/gcc.dg/Walloca-7.c +++ b/gcc/testsuite/gcc.dg/Walloca-7.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca -O0" } */ extern void f(void *); diff --git a/gcc/testsuite/gcc.dg/Walloca-8.c b/gcc/testsuite/gcc.dg/Walloca-8.c index a4a120485cd..b64af091791 100644 --- a/gcc/testsuite/gcc.dg/Walloca-8.c +++ b/gcc/testsuite/gcc.dg/Walloca-8.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=2000 -O2" } */ void *p; diff --git a/gcc/testsuite/gcc.dg/Walloca-9.c b/gcc/testsuite/gcc.dg/Walloca-9.c index c67d9d63255..b82324a7373 100644 --- a/gcc/testsuite/gcc.dg/Walloca-9.c +++ b/gcc/testsuite/gcc.dg/Walloca-9.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=5000 -O2" } */ extern void useit(char *); diff --git a/gcc/testsuite/gcc.dg/Wvla-larger-than-1.c b/gcc/testsuite/gcc.dg/Wvla-larger-than-1.c index 384c930c995..f0617f95303 100644 --- a/gcc/testsuite/gcc.dg/Wvla-larger-than-1.c +++ b/gcc/testsuite/gcc.dg/Wvla-larger-than-1.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Wvla-larger-than=100 -O2" } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/Wvla-larger-than-2.c b/gcc/testsuite/gcc.dg/Wvla-larger-than-2.c index 96814dcaac0..42ec5bbf4f8 100644 --- a/gcc/testsuite/gcc.dg/Wvla-larger-than-2.c +++ b/gcc/testsuite/gcc.dg/Wvla-larger-than-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target stdint_types } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-O2 -Wvla-larger-than=40" } */ #include diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-6.c b/gcc/testsuite/gcc.dg/attr-alloc_size-6.c index fc3e22c5c36..bf010c53607 100644 --- a/gcc/testsuite/gcc.dg/attr-alloc_size-6.c +++ b/gcc/testsuite/gcc.dg/attr-alloc_size-6.c @@ -4,6 +4,7 @@ to allocate objects in excess of the number of bytes specified by -Walloc-larger-than=maximum. */ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-O0 -Wall -Walloc-size-larger-than=12345" } */ #define MAXOBJSZ 12345 diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-7.c b/gcc/testsuite/gcc.dg/attr-alloc_size-7.c index a3b2a6bbb4f..9a398294c8e 100644 --- a/gcc/testsuite/gcc.dg/attr-alloc_size-7.c +++ b/gcc/testsuite/gcc.dg/attr-alloc_size-7.c @@ -3,6 +3,7 @@ detect and diagnose calls that attemnpt to allocate objects in excess of the maximum specified by -Walloc-size-larger-than=maximum. */ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-O2 -Wall -Walloc-size-larger-than=12345" } */ #define SIZE_MAX __SIZE_MAX__ diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-8.c b/gcc/testsuite/gcc.dg/attr-alloc_size-8.c index 6282a46e6df..b8ba9424b4e 100644 --- a/gcc/testsuite/gcc.dg/attr-alloc_size-8.c +++ b/gcc/testsuite/gcc.dg/attr-alloc_size-8.c @@ -3,6 +3,7 @@ -Wvla-larger-than, and -Walloc-size-larger-than options. The former two more specific options override the more general latter option. */ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-O2 -Walloc-size-larger-than=123 -Walloca-larger-than=234 -Wvla-larger-than=345" } */ #define SIZE_MAX __SIZE_MAX__ diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size-9.c b/gcc/testsuite/gcc.dg/attr-alloc_size-9.c index 0e75bb2b535..0c50b0ab63c 100644 --- a/gcc/testsuite/gcc.dg/attr-alloc_size-9.c +++ b/gcc/testsuite/gcc.dg/attr-alloc_size-9.c @@ -3,6 +3,7 @@ with attribute malloc. This means that the pointer they return can be assumed not to alias any other valid pointer. */ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ void sink (void*); diff --git a/gcc/testsuite/gcc.dg/builtin-alloc-size.c b/gcc/testsuite/gcc.dg/builtin-alloc-size.c index 6929e884601..cff3e8ad06f 100644 --- a/gcc/testsuite/gcc.dg/builtin-alloc-size.c +++ b/gcc/testsuite/gcc.dg/builtin-alloc-size.c @@ -3,6 +3,7 @@ attribute alloc_size that __builtin_object_size can make use of (or are treated as if they were for that purpose).. { dg-do compile } + { dg-require-effective-target alloca } { dg-additional-options "-O2 -fdump-tree-optimized" } */ void sink (void*); diff --git a/gcc/testsuite/gcc.dg/torture/pr71881.c b/gcc/testsuite/gcc.dg/torture/pr71881.c index b17db1b21c1..34325ba164a 100644 --- a/gcc/testsuite/gcc.dg/torture/pr71881.c +++ b/gcc/testsuite/gcc.dg/torture/pr71881.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-additional-options "-g" } */ int a, b, c, d, *e, f, g; diff --git a/gcc/testsuite/gcc.dg/torture/pr71901.c b/gcc/testsuite/gcc.dg/torture/pr71901.c index 0be1d73b38c..42e9b0e968a 100644 --- a/gcc/testsuite/gcc.dg/torture/pr71901.c +++ b/gcc/testsuite/gcc.dg/torture/pr71901.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ typedef struct { int _mp_size; } mpz_t[1]; int a, b; diff --git a/gcc/testsuite/gcc.dg/torture/pr78742.c b/gcc/testsuite/gcc.dg/torture/pr78742.c index c83ecbcb7d7..75601d4392f 100644 --- a/gcc/testsuite/gcc.dg/torture/pr78742.c +++ b/gcc/testsuite/gcc.dg/torture/pr78742.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target int128 } */ +/* { dg-require-effective-target alloca } */ void foo(); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-3.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-3.c index d7d931716ce..72ec3afaa41 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-3.c @@ -4,6 +4,7 @@ -O2 (-ftree-vrp) is necessary for the tests involving ranges to pass, otherwise -O1 is sufficient. { dg-do compile } + { dg-require-effective-target alloca } { dg-options "-O2 -Wformat -Wformat-overflow=1 -ftrack-macro-expansion=0" } */ typedef __SIZE_TYPE__ size_t;