aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-02-09 16:49:38 +0100
committerTom de Vries <tdevries@suse.de>2022-02-11 08:44:07 +0100
commit893aeac17c7edaa313b6404070cc30ea460b0d2f (patch)
tree470e1ea5b8f82c1557ab8b75e5ac197382aeb8da
parentfd64b09217fbe8fa33b559e61564071e8aca71e5 (diff)
downloadgcc-893aeac17c7edaa313b6404070cc30ea460b0d2f.zip
gcc-893aeac17c7edaa313b6404070cc30ea460b0d2f.tar.gz
gcc-893aeac17c7edaa313b6404070cc30ea460b0d2f.tar.bz2
[testsuite] Require alloca support in a few tests
Require effective target alloca in a few test-cases. Tested on nvptx. gcc/testsuite/ChangeLog: 2022-02-10 Tom de Vries <tdevries@suse.de> * c-c++-common/Walloca-larger-than.c: Require effective target alloca. * c-c++-common/Warray-bounds-9.c: Same. * c-c++-common/Wdangling-pointer-2.c: Same. * c-c++-common/Wdangling-pointer-4.c: Same. * c-c++-common/Wdangling-pointer-5.c: Same. * c-c++-common/Wdangling-pointer.c: Same. * c-c++-common/auto-init-11.c: Same. * c-c++-common/auto-init-12.c: Same. * c-c++-common/auto-init-15.c: Same. * c-c++-common/auto-init-16.c: Same. * c-c++-common/torture/builtin-clear-padding-4.c: Same. * gcc.c-torture/compile/pr99787-1.c: Same. * gcc.dg/Walloca-larger-than-4.c: Same. * gcc.dg/Wdangling-pointer.c: Same. * gcc.dg/Wfree-nonheap-object-2.c: Same. * gcc.dg/Wfree-nonheap-object.c: Same. * gcc.dg/Wstringop-overflow-56.c: Same. * gcc.dg/Wstringop-overflow-57.c: Same. * gcc.dg/Wstringop-overflow-67.c: Same. * gcc.dg/Wstringop-overflow-71.c: Same. * gcc.dg/Wvla-larger-than-5.c: Same. * gcc.dg/analyzer/taint-alloc-1.c: Same. * gcc.dg/analyzer/torture/ubsan-1.c: Same. * gcc.dg/graphite/pr99085.c: Same. * gcc.dg/pr100225.c: Same. * gcc.dg/pr98721-1.c: Same. * gcc.dg/pr99122-2.c: Same. * gcc.dg/sso-14.c: Same. * gcc.dg/tree-ssa/builtin-sprintf-warn-25.c: Same. * gcc.dg/uninit-38.c: Same. * gcc.dg/uninit-39.c: Same. * gcc.dg/uninit-41.c: Same. * gcc.dg/uninit-pr100250.c: Same. * gcc.dg/uninit-pr101300.c: Same. * gcc.dg/uninit-pr101494.c: Same. * gcc.dg/uninit-pr98578.c: Same. * gcc.dg/uninit-pr98583.c: Same. * gcc.dg/vla-stexp-1.c: Same. * gcc.dg/vla-stexp-2.c: Same. * gcc.dg/vla-stexp-4.c: Same. * gcc.dg/vla-stexp-5.c: Same.
-rw-r--r--gcc/testsuite/c-c++-common/Walloca-larger-than.c3
-rw-r--r--gcc/testsuite/c-c++-common/Warray-bounds-9.c3
-rw-r--r--gcc/testsuite/c-c++-common/Wdangling-pointer-2.c3
-rw-r--r--gcc/testsuite/c-c++-common/Wdangling-pointer-4.c3
-rw-r--r--gcc/testsuite/c-c++-common/Wdangling-pointer-5.c3
-rw-r--r--gcc/testsuite/c-c++-common/Wdangling-pointer.c3
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-11.c1
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-12.c1
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-15.c1
-rw-r--r--gcc/testsuite/c-c++-common/auto-init-16.c1
-rw-r--r--gcc/testsuite/c-c++-common/torture/builtin-clear-padding-4.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr99787-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/Walloca-larger-than-4.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wdangling-pointer.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wfree-nonheap-object-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wfree-nonheap-object.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-56.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-57.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-67.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wstringop-overflow-71.c3
-rw-r--r--gcc/testsuite/gcc.dg/Wvla-larger-than-5.c3
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/taint-alloc-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/analyzer/torture/ubsan-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr99085.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr100225.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr98721-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr99122-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/sso-14.c1
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-25.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-38.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-39.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-41.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr100250.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr101300.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr101494.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr98578.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pr98583.c3
-rw-r--r--gcc/testsuite/gcc.dg/vla-stexp-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/vla-stexp-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/vla-stexp-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/vla-stexp-5.c1
41 files changed, 66 insertions, 24 deletions
diff --git a/gcc/testsuite/c-c++-common/Walloca-larger-than.c b/gcc/testsuite/c-c++-common/Walloca-larger-than.c
index e7851ea..6fdc1de 100644
--- a/gcc/testsuite/c-c++-common/Walloca-larger-than.c
+++ b/gcc/testsuite/c-c++-common/Walloca-larger-than.c
@@ -1,6 +1,7 @@
/* PR middle-end/100425 - missing -Walloca-larger-than with -O0
{ dg-do compile }
- { dg-options "-O0 -Wall -Walloca-larger-than=128" } */
+ { dg-options "-O0 -Wall -Walloca-larger-than=128" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/c-c++-common/Warray-bounds-9.c b/gcc/testsuite/c-c++-common/Warray-bounds-9.c
index be05775..3b5cdfe 100644
--- a/gcc/testsuite/c-c++-common/Warray-bounds-9.c
+++ b/gcc/testsuite/c-c++-common/Warray-bounds-9.c
@@ -1,7 +1,8 @@
/* PR tree-optimization/99121 - ICE in -Warray-bounds on a multidimensional
VLA
{ dg-do compile }
- { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
+ { dg-options "-O2 -Wall -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
#define NOIPA __attribute__ ((noipa))
diff --git a/gcc/testsuite/c-c++-common/Wdangling-pointer-2.c b/gcc/testsuite/c-c++-common/Wdangling-pointer-2.c
index 527e5e7..20f11b2 100644
--- a/gcc/testsuite/c-c++-common/Wdangling-pointer-2.c
+++ b/gcc/testsuite/c-c++-common/Wdangling-pointer-2.c
@@ -2,7 +2,8 @@
variable within the same function
Exercise basic cases of -Wdangling-pointer with optimization.
{ dg-do compile }
- { dg-options "-O2 -Wall -Wno-uninitialized -Wno-return-local-addr -ftrack-macro-expansion=0" } */
+ { dg-options "-O2 -Wall -Wno-uninitialized -Wno-return-local-addr -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
typedef __INTPTR_TYPE__ intptr_t;
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/c-c++-common/Wdangling-pointer-4.c b/gcc/testsuite/c-c++-common/Wdangling-pointer-4.c
index e57e66f..a747aab 100644
--- a/gcc/testsuite/c-c++-common/Wdangling-pointer-4.c
+++ b/gcc/testsuite/c-c++-common/Wdangling-pointer-4.c
@@ -2,7 +2,8 @@
variable within the same function
Exercise -Wdangling-pointer for VLAs.
{ dg-do compile }
- { dg-options "-O0 -Wall -ftrack-macro-expansion=0" } */
+ { dg-options "-O0 -Wall -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
void sink (void*, ...);
diff --git a/gcc/testsuite/c-c++-common/Wdangling-pointer-5.c b/gcc/testsuite/c-c++-common/Wdangling-pointer-5.c
index 1f549ca..2a165ce 100644
--- a/gcc/testsuite/c-c++-common/Wdangling-pointer-5.c
+++ b/gcc/testsuite/c-c++-common/Wdangling-pointer-5.c
@@ -3,7 +3,8 @@
Exercise -Wdangling-pointer for escaping stores of addreses of auto
variables.
{ dg-do compile }
- { dg-options "-O0 -Wall -ftrack-macro-expansion=0" } */
+ { dg-options "-O0 -Wall -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
void* alloca (__SIZE_TYPE__);
diff --git a/gcc/testsuite/c-c++-common/Wdangling-pointer.c b/gcc/testsuite/c-c++-common/Wdangling-pointer.c
index 394ff92..0a18c3c 100644
--- a/gcc/testsuite/c-c++-common/Wdangling-pointer.c
+++ b/gcc/testsuite/c-c++-common/Wdangling-pointer.c
@@ -2,7 +2,8 @@
variable within the same function
Exercise basic cases of -Wdangling-pointer without optimization.
{ dg-do compile }
- { dg-options "-O0 -Wall -Wno-uninitialized -ftrack-macro-expansion=0" } */
+ { dg-options "-O0 -Wall -Wno-uninitialized -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
typedef __INTPTR_TYPE__ intptr_t;
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/c-c++-common/auto-init-11.c b/gcc/testsuite/c-c++-common/auto-init-11.c
index 6eb4687..aafa215 100644
--- a/gcc/testsuite/c-c++-common/auto-init-11.c
+++ b/gcc/testsuite/c-c++-common/auto-init-11.c
@@ -1,6 +1,7 @@
/* Verify zero initialization for VLA automatic variables. */
/* { dg-do compile } */
/* { dg-options "-ftrivial-auto-var-init=zero -fdump-tree-gimple" } */
+/* { dg-require-effective-target alloca } */
extern void bar (int);
diff --git a/gcc/testsuite/c-c++-common/auto-init-12.c b/gcc/testsuite/c-c++-common/auto-init-12.c
index 964291c..c073bc9 100644
--- a/gcc/testsuite/c-c++-common/auto-init-12.c
+++ b/gcc/testsuite/c-c++-common/auto-init-12.c
@@ -1,6 +1,7 @@
/* Verify zero initialization for VLA automatic variables. */
/* { dg-do compile } */
/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-tree-gimple" } */
+/* { dg-require-effective-target alloca } */
extern void bar (int);
diff --git a/gcc/testsuite/c-c++-common/auto-init-15.c b/gcc/testsuite/c-c++-common/auto-init-15.c
index 5857287..77710a9 100644
--- a/gcc/testsuite/c-c++-common/auto-init-15.c
+++ b/gcc/testsuite/c-c++-common/auto-init-15.c
@@ -1,6 +1,7 @@
/* Verify the auto initialization of nested VLA. */
/* { dg-do compile } */
/* { dg-options "-ftrivial-auto-var-init=zero -fdump-tree-gimple" } */
+/* { dg-require-effective-target alloca } */
void g(void *);
diff --git a/gcc/testsuite/c-c++-common/auto-init-16.c b/gcc/testsuite/c-c++-common/auto-init-16.c
index 1e30995..3714bc3 100644
--- a/gcc/testsuite/c-c++-common/auto-init-16.c
+++ b/gcc/testsuite/c-c++-common/auto-init-16.c
@@ -1,6 +1,7 @@
/* Verify the auto initialization of nested VLA. */
/* { dg-do compile } */
/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-tree-gimple" } */
+/* { dg-require-effective-target alloca } */
void g(void *);
diff --git a/gcc/testsuite/c-c++-common/torture/builtin-clear-padding-4.c b/gcc/testsuite/c-c++-common/torture/builtin-clear-padding-4.c
index d24f3b5..9cb202f 100644
--- a/gcc/testsuite/c-c++-common/torture/builtin-clear-padding-4.c
+++ b/gcc/testsuite/c-c++-common/torture/builtin-clear-padding-4.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target alloca } */
+
/* PR libstdc++/88101 */
struct S { char a; short b; char c; };
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr99787-1.c b/gcc/testsuite/gcc.c-torture/compile/pr99787-1.c
index d98b7e7..0e16301 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr99787-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr99787-1.c
@@ -1,4 +1,5 @@
/* { dg-options "-ftree-slp-vectorize -ffp-contract=on -ffloat-store" } */
+/* { dg-require-effective-target alloca } */
_Complex foo_x_0;
int foo_n11, foo_i, foo_l;
diff --git a/gcc/testsuite/gcc.dg/Walloca-larger-than-4.c b/gcc/testsuite/gcc.dg/Walloca-larger-than-4.c
index 9d4c4e8..aac8b97 100644
--- a/gcc/testsuite/gcc.dg/Walloca-larger-than-4.c
+++ b/gcc/testsuite/gcc.dg/Walloca-larger-than-4.c
@@ -1,6 +1,7 @@
/* PR middle-end/100425 - missing -Walloca-larger-than with -O0
{ dg-do compile }
- { dg-options "-O0 -Wall -Walloca-larger-than=128" } */
+ { dg-options "-O0 -Wall -Walloca-larger-than=128" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/Wdangling-pointer.c b/gcc/testsuite/gcc.dg/Wdangling-pointer.c
index d792d09..89e2220 100644
--- a/gcc/testsuite/gcc.dg/Wdangling-pointer.c
+++ b/gcc/testsuite/gcc.dg/Wdangling-pointer.c
@@ -1,6 +1,7 @@
/* Exercise basic C-only cases of -Wdangling-pointer.
{ dg-do compile }
- { dg-options "-O0 -Wall" } */
+ { dg-options "-O0 -Wall" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/Wfree-nonheap-object-2.c b/gcc/testsuite/gcc.dg/Wfree-nonheap-object-2.c
index 2b00d77..e9316a5 100644
--- a/gcc/testsuite/gcc.dg/Wfree-nonheap-object-2.c
+++ b/gcc/testsuite/gcc.dg/Wfree-nonheap-object-2.c
@@ -2,7 +2,8 @@
Verify that attempting to reallocate unallocated objects referenced
either directly or through pointers is diagnosed.
{ dg-do compile }
- { dg-options "-O2 -Wall -Wfree-nonheap-object" } */
+ { dg-options "-O2 -Wall -Wfree-nonheap-object" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/Wfree-nonheap-object.c b/gcc/testsuite/gcc.dg/Wfree-nonheap-object.c
index bb222cc..c7c6680 100644
--- a/gcc/testsuite/gcc.dg/Wfree-nonheap-object.c
+++ b/gcc/testsuite/gcc.dg/Wfree-nonheap-object.c
@@ -3,7 +3,8 @@
or through pointers is diagnosed. In most cases this doesn't require
optimization.
{ dg-do compile }
- { dg-options "-Wall -Wfree-nonheap-object" } */
+ { dg-options "-Wall -Wfree-nonheap-object" }
+ { dg-require-effective-target alloca } */
typedef __INTPTR_TYPE__ intptr_t;
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-56.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-56.c
index b3e598c..5ba4de4 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-56.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-56.c
@@ -1,7 +1,8 @@
/* PR middle-end/92942 - missing -Wstringop-overflow for allocations with
a negative lower bound size
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
#define SIZE_MAX __SIZE_MAX__
#define UINT8_MAX __UINT8_MAX__
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-57.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-57.c
index 173aa16..6ae8589 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-57.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-57.c
@@ -1,7 +1,8 @@
/* Verify that an anti-range ~[A, B] with small positive A and B
is handled correctly and doesn't trigger warnings.
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
typedef __typeof__ (sizeof 0) size_t;
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-67.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-67.c
index 7b8f3f0..0f01082 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-67.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-67.c
@@ -1,7 +1,8 @@
/* PR middle-end/100571 - bogus -Wstringop-overflow with VLA of elements
larger than byte
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
__attribute__ ((access (read_only, 1, 2))) void fro (int *, int);
__attribute__ ((access (write_only, 1, 2))) void fwo (int *, int);
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-71.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-71.c
index f56a005..74311ec 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-71.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-71.c
@@ -2,7 +2,8 @@
a larger scalar into a smaller array
Verify warnings for overflow by stores of results of built-in functions.
{ dg-do compile }
- { dg-options "-O2" } */
+ { dg-options "-O2" }
+ { dg-require-effective-target alloca } */
typedef __INT16_TYPE__ int16_t;
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/Wvla-larger-than-5.c b/gcc/testsuite/gcc.dg/Wvla-larger-than-5.c
index c131f83..ebd7fb3 100644
--- a/gcc/testsuite/gcc.dg/Wvla-larger-than-5.c
+++ b/gcc/testsuite/gcc.dg/Wvla-larger-than-5.c
@@ -1,6 +1,7 @@
/* PR middle-end/100510 - bogus -Wvla-large-than with -Walloca
{ dg-do compile }
- { dg-options "-O0 -Walloca -Wvla-larger-than=1000" } */
+ { dg-options "-O0 -Walloca -Wvla-larger-than=1000" }
+ { dg-require-effective-target alloca } */
void f (void*);
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-alloc-1.c b/gcc/testsuite/gcc.dg/analyzer/taint-alloc-1.c
index 102aa4b..bc4f63b 100644
--- a/gcc/testsuite/gcc.dg/analyzer/taint-alloc-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-alloc-1.c
@@ -1,5 +1,6 @@
// TODO: remove need for this option
/* { dg-additional-options "-fanalyzer-checker=taint" } */
+/* { dg-require-effective-target alloca } */
#include "analyzer-decls.h"
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/ubsan-1.c b/gcc/testsuite/gcc.dg/analyzer/torture/ubsan-1.c
index 2e1e6a0..18a5f8d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/ubsan-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/ubsan-1.c
@@ -1,5 +1,6 @@
/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
/* { dg-additional-options "-fsanitize=bounds" } */
+/* { dg-require-effective-target alloca } */
#include <stdlib.h>
#include "../analyzer-decls.h"
diff --git a/gcc/testsuite/gcc.dg/graphite/pr99085.c b/gcc/testsuite/gcc.dg/graphite/pr99085.c
index dc1c935..dd06886 100644
--- a/gcc/testsuite/gcc.dg/graphite/pr99085.c
+++ b/gcc/testsuite/gcc.dg/graphite/pr99085.c
@@ -1,6 +1,7 @@
/* PR target/99085 */
/* { dg-do compile } */
/* { dg-options "-O2 -fgraphite-identity -fsel-sched-pipelining -fselective-scheduling2" } */
+/* { dg-require-effective-target alloca } */
void
foo (int m, int n, int o, int i)
diff --git a/gcc/testsuite/gcc.dg/pr100225.c b/gcc/testsuite/gcc.dg/pr100225.c
index b321634..f0efd29 100644
--- a/gcc/testsuite/gcc.dg/pr100225.c
+++ b/gcc/testsuite/gcc.dg/pr100225.c
@@ -1,6 +1,7 @@
/* PR rtl-optimization/100225 */
/* { dg-do compile } */
/* { dg-options "-O1 -fmodulo-sched" } */
+/* { dg-require-effective-target alloca } */
void
vorbis_synthesis_lapout (void);
diff --git a/gcc/testsuite/gcc.dg/pr98721-1.c b/gcc/testsuite/gcc.dg/pr98721-1.c
index 868b071..1c7574f 100644
--- a/gcc/testsuite/gcc.dg/pr98721-1.c
+++ b/gcc/testsuite/gcc.dg/pr98721-1.c
@@ -1,6 +1,7 @@
/* PR tree-optimization/98721 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
int
foo (int n)
diff --git a/gcc/testsuite/gcc.dg/pr99122-2.c b/gcc/testsuite/gcc.dg/pr99122-2.c
index 2b10542..c0c850f 100644
--- a/gcc/testsuite/gcc.dg/pr99122-2.c
+++ b/gcc/testsuite/gcc.dg/pr99122-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -g -w" } */
+/* { dg-require-effective-target alloca } */
static int foo ();
diff --git a/gcc/testsuite/gcc.dg/sso-14.c b/gcc/testsuite/gcc.dg/sso-14.c
index aeff3fb..7b1590a 100644
--- a/gcc/testsuite/gcc.dg/sso-14.c
+++ b/gcc/testsuite/gcc.dg/sso-14.c
@@ -2,6 +2,7 @@
/* Testcase by George Thopas <george.thopas@gmail.com> */
/* { dg-do compile } */
+/* { dg-require-effective-target alloca } */
#include <stddef.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-25.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-25.c
index df46023..a28f066 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-25.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-25.c
@@ -1,6 +1,7 @@
/* PR middle-end/97373 - missing warning on sprintf into allocated destination
{ dg-do compile }
- { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
+ { dg-options "-O2 -Wall -ftrack-macro-expansion=0" }
+ { dg-require-effective-target alloca } */
#include "../range.h"
diff --git a/gcc/testsuite/gcc.dg/uninit-38.c b/gcc/testsuite/gcc.dg/uninit-38.c
index ff2aee6..9a20243 100644
--- a/gcc/testsuite/gcc.dg/uninit-38.c
+++ b/gcc/testsuite/gcc.dg/uninit-38.c
@@ -6,7 +6,8 @@
be adjusted. Ditto if -Wuninitialized output changes for some
other reason.
{ dg-do compile { target { { lp64 || ilp32 } || llp64 } } }
- { dg-options "-O2 -Wall -ftrack-macro-expansion=0 -fno-ipa-modref" } */
+ { dg-options "-O2 -Wall -ftrack-macro-expansion=0 -fno-ipa-modref" }
+ { dg-require-effective-target alloca } */
#define CONCAT(x, y) x ## y
#define CAT(x, y) CONCAT(x, y)
diff --git a/gcc/testsuite/gcc.dg/uninit-39.c b/gcc/testsuite/gcc.dg/uninit-39.c
index 0f91854..4d17f14 100644
--- a/gcc/testsuite/gcc.dg/uninit-39.c
+++ b/gcc/testsuite/gcc.dg/uninit-39.c
@@ -1,7 +1,8 @@
/* PR c/98592 - ICE in gimple_canonical_types_compatible_p while formatting
a MEM_REF
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
void f (int);
diff --git a/gcc/testsuite/gcc.dg/uninit-41.c b/gcc/testsuite/gcc.dg/uninit-41.c
index b485611..f2e17a8 100644
--- a/gcc/testsuite/gcc.dg/uninit-41.c
+++ b/gcc/testsuite/gcc.dg/uninit-41.c
@@ -1,7 +1,8 @@
/* Verify that calls to non-modifying built-ins aren't considered
potentially modifying.
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/uninit-pr100250.c b/gcc/testsuite/gcc.dg/uninit-pr100250.c
index 8e7a787..d47fc24c 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr100250.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr100250.c
@@ -1,6 +1,7 @@
/* PR middle-end/100250 - ICE related to -Wmaybe-uninitialized
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
extern void f (int D, const int[D], const int[D]);
diff --git a/gcc/testsuite/gcc.dg/uninit-pr101300.c b/gcc/testsuite/gcc.dg/uninit-pr101300.c
index 4392e8ba..840fd0b 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr101300.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr101300.c
@@ -1,7 +1,8 @@
/* PR middle-end/101300 - -fsanitize=undefined suppresses -Wuninitialized
for a VLA read at -O0
{ dg-do compile }
- { dg-options "-O0 -Wall -fsanitize=undefined" } */
+ { dg-options "-O0 -Wall -fsanitize=undefined" }
+ { dg-require-effective-target alloca } */
int warn_vla_rd0 (int n)
{
diff --git a/gcc/testsuite/gcc.dg/uninit-pr101494.c b/gcc/testsuite/gcc.dg/uninit-pr101494.c
index d3267b6..3c68d14 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr101494.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr101494.c
@@ -1,6 +1,7 @@
/* PR middle-end/101494 - bogus -Wmaybe-uninitialized on memrchr of size 0
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/uninit-pr98578.c b/gcc/testsuite/gcc.dg/uninit-pr98578.c
index 745328b..db566c79 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr98578.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr98578.c
@@ -1,6 +1,7 @@
/* PR middle-end/98578 - ICE warning on uninitialized VLA access
{ dg-do compile }
- { dg-options "-O2 -Wall -fno-ipa-modref" } */
+ { dg-options "-O2 -Wall -fno-ipa-modref" }
+ { dg-require-effective-target alloca } */
void* malloc (__SIZE_TYPE__);
diff --git a/gcc/testsuite/gcc.dg/uninit-pr98583.c b/gcc/testsuite/gcc.dg/uninit-pr98583.c
index 638b029..6159c95 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr98583.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr98583.c
@@ -1,7 +1,8 @@
/* PR middle-end/98583 - missing -Wuninitialized reading from a second VLA
in its own block
{ dg-do compile }
- { dg-options "-O2 -Wall" } */
+ { dg-options "-O2 -Wall" }
+ { dg-require-effective-target alloca } */
void f (int*);
void g (int);
diff --git a/gcc/testsuite/gcc.dg/vla-stexp-1.c b/gcc/testsuite/gcc.dg/vla-stexp-1.c
index 97d6693..baaad36 100644
--- a/gcc/testsuite/gcc.dg/vla-stexp-1.c
+++ b/gcc/testsuite/gcc.dg/vla-stexp-1.c
@@ -1,6 +1,7 @@
/* PR29970*/
/* { dg-do run } */
/* { dg-options "-Wall -O0" } */
+/* { dg-require-effective-target alloca } */
int foo(void)
{
diff --git a/gcc/testsuite/gcc.dg/vla-stexp-2.c b/gcc/testsuite/gcc.dg/vla-stexp-2.c
index 176f400..9f15125 100644
--- a/gcc/testsuite/gcc.dg/vla-stexp-2.c
+++ b/gcc/testsuite/gcc.dg/vla-stexp-2.c
@@ -1,6 +1,7 @@
/* PR101838 */
/* { dg-do run } */
/* { dg-options "-Wpedantic -O0" } */
+/* { dg-require-effective-target alloca } */
int bar0(
diff --git a/gcc/testsuite/gcc.dg/vla-stexp-4.c b/gcc/testsuite/gcc.dg/vla-stexp-4.c
index 612b5a8..929768c 100644
--- a/gcc/testsuite/gcc.dg/vla-stexp-4.c
+++ b/gcc/testsuite/gcc.dg/vla-stexp-4.c
@@ -1,6 +1,7 @@
/* PR29970, PR91038 */
/* { dg-do run } */
/* { dg-options "-O0 -Wunused-variable" } */
+/* { dg-require-effective-target alloca } */
int foo3b(void) // should not return 0
{
diff --git a/gcc/testsuite/gcc.dg/vla-stexp-5.c b/gcc/testsuite/gcc.dg/vla-stexp-5.c
index d6a7f2b..68614f2 100644
--- a/gcc/testsuite/gcc.dg/vla-stexp-5.c
+++ b/gcc/testsuite/gcc.dg/vla-stexp-5.c
@@ -1,6 +1,7 @@
/* PR29970 */
/* { dg-do run } */
/* { dg-options "-Wunused-variable" } */
+/* { dg-require-effective-target alloca } */