From e2acc079ff125a869159be45371dc0a29b230e92 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Mon, 10 Nov 2014 16:30:09 +0000 Subject: [PATCH] Testsuite alloca fixes for ptx. * lib/target-supports.exp (check_effective_target_alloca): New function. * gcc.c-torture/execute/20010209-1.c: Require alloca. * gcc.c-torture/execute/20020314-1.c: Likewise. * gcc.c-torture/execute/20020412-1.c: Likewise. * gcc.c-torture/execute/20021113-1.c: Likewise. * gcc.c-torture/execute/20040223-1.c: Likewise. * gcc.c-torture/execute/20040308-1.c: Likewise. * gcc.c-torture/execute/20040811-1.c: Likewise. * gcc.c-torture/execute/20070824-1.c: Likewise. * gcc.c-torture/execute/20070919-1.c: Likewise. * gcc.c-torture/execute/built-in-setjmp.c: Likewise. * gcc.c-torture/execute/pr22061-1.c: Likewise. * gcc.c-torture/execute/pr22061-4.c: Likewise. * gcc.c-torture/execute/pr43220.c: Likewise. * gcc.c-torture/execute/vla-dealloc-1.c: Likewise. * gcc.dg/torture/stackalign/alloca-1.c: Likewise. * gcc.dg/torture/stackalign/vararg-1.c: Likewise. * gcc.dg/torture/stackalign/vararg-2.c: Likewise. * gcc.c-torture/compile/20000923-1.c: Likewise. * gcc.c-torture/compile/20030224-1.c: Likewise. * gcc.c-torture/compile/20071108-1.c: Likewise. * gcc.c-torture/compile/20071117-1.c: Likewise. * gcc.c-torture/compile/900313-1.c: Likewise. * gcc.c-torture/compile/pr17397.c: Likewise. * gcc.c-torture/compile/pr35006.c: Likewise. * gcc.c-torture/compile/pr42956.c: Likewise. * gcc.c-torture/compile/pr51354.c: Likewise. * gcc.c-torture/compile/pr55851.c: Likewise. * gcc.c-torture/compile/vla-const-1.c: Likewise. * gcc.c-torture/compile/vla-const-2.c: Likewise. * gcc.c-torture/compile/pr31507-1.c: Likewise. * gcc.c-torture/compile/pr52714.c: Likewise. * gcc.dg/20001012-2.c: Likewise. * gcc.dg/auto-type-1.c: Likewise. * gcc.dg/builtin-object-size-1.c: Likewise. * gcc.dg/builtin-object-size-2.c: Likewise. * gcc.dg/builtin-object-size-3.c: Likewise. * gcc.dg/builtin-object-size-4.c: Likewise. * gcc.dg/packed-vla.c: Likewise. * gcc.c-torture/compile/parms.c: Likewise. * gcc.c-torture/execute/920721-2.c: Skip -O0 unless alloca is available. * gcc.c-torture/execute/920929-1.c: Likewise. * gcc.c-torture/execute/921017-1.c: Likewise. * gcc.c-torture/execute/941202-1.c: Likewise. * gcc.c-torture/execute/align-nest.c: Likewise. * gcc.c-torture/execute/alloca-1.c: Likewise. * gcc.c-torture/execute/pr36321.c: Likewise. * gcc.c-torture/compile/20001221-1.c: Likewise. * gcc.c-torture/compile/20020807-1.c: Likewise. * gcc.c-torture/compile/20050801-2.c: Likewise. * gcc.c-torture/compile/920428-4.c: Likewise. * gcc.c-torture/compile/debugvlafunction-1.c.c: Likewise. * gcc.c-torture/compile/pr41469.c: Likewise. * gcc.dg/torture/pr48953.c: Likewise. * gcc.dg/torture/pr8081.c: Likewise. * gcc.dg/torture/stackalign/inline-1.c: Skip if nvptx-*-*. * gcc.dg/torture/stackalign/inline-2.c: Likewise. * gcc.dg/torture/stackalign/nested-1.c: Likewise. * gcc.dg/torture/stackalign/nested-2.c: Likewise. * gcc.dg/torture/stackalign/nested-3.c: Likewise. * gcc.dg/torture/stackalign/nested-4.c: Likewise. * gcc.dg/torture/stackalign/nested-1.c: Likewise. * gcc.dg/torture/stackalign/global-1.c: Likewise. * gcc.dg/torture/stackalign/pr16660-1.c: Likewise. * gcc.dg/torture/stackalign/pr16660-2.c: Likewise. * gcc.dg/torture/stackalign/pr16660-3.c: Likewise. * gcc.dg/torture/stackalign/ret-struct-1.c: Likewise. * gcc.dg/torture/stackalign/struct-1.c: Likewise. From-SVN: r217296 --- gcc/testsuite/ChangeLog | 71 +++++++++++++++++++ .../gcc.c-torture/compile/20000923-1.c | 1 + .../gcc.c-torture/compile/20001221-1.c | 1 + .../gcc.c-torture/compile/20020807-1.c | 1 + .../gcc.c-torture/compile/20030224-1.c | 1 + .../gcc.c-torture/compile/20050801-2.c | 1 + .../gcc.c-torture/compile/20071108-1.c | 1 + .../gcc.c-torture/compile/20071117-1.c | 1 + .../gcc.c-torture/compile/900313-1.c | 1 + .../gcc.c-torture/compile/920428-4.c | 1 + .../compile/debugvlafunction-1.c | 1 + gcc/testsuite/gcc.c-torture/compile/parms.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr17397.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr35006.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr41469.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr42956.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr51354.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr52714.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr55851.c | 1 + .../gcc.c-torture/compile/vla-const-1.c | 1 + .../gcc.c-torture/compile/vla-const-2.c | 1 + .../gcc.c-torture/execute/20010209-1.c | 1 + .../gcc.c-torture/execute/20020314-1.c | 1 + .../gcc.c-torture/execute/20020412-1.c | 1 + .../gcc.c-torture/execute/20021113-1.c | 2 + .../gcc.c-torture/execute/20040223-1.c | 1 + .../gcc.c-torture/execute/20040308-1.c | 1 + .../gcc.c-torture/execute/20040811-1.c | 1 + .../gcc.c-torture/execute/20070824-1.c | 1 + .../gcc.c-torture/execute/20070919-1.c | 1 + .../gcc.c-torture/execute/920721-2.c | 1 + .../gcc.c-torture/execute/920929-1.c | 1 + .../gcc.c-torture/execute/921017-1.c | 1 + .../gcc.c-torture/execute/941202-1.c | 1 + .../gcc.c-torture/execute/align-nest.c | 1 + .../gcc.c-torture/execute/alloca-1.c | 1 + .../gcc.c-torture/execute/built-in-setjmp.c | 2 + .../gcc.c-torture/execute/pr22061-1.c | 1 + .../gcc.c-torture/execute/pr22061-4.c | 1 + gcc/testsuite/gcc.c-torture/execute/pr36321.c | 1 + gcc/testsuite/gcc.c-torture/execute/pr43220.c | 1 + .../gcc.c-torture/execute/vla-dealloc-1.c | 1 + gcc/testsuite/gcc.dg/20001012-2.c | 1 + gcc/testsuite/gcc.dg/auto-type-1.c | 1 + gcc/testsuite/gcc.dg/builtin-object-size-1.c | 1 + gcc/testsuite/gcc.dg/builtin-object-size-2.c | 1 + gcc/testsuite/gcc.dg/builtin-object-size-3.c | 1 + gcc/testsuite/gcc.dg/builtin-object-size-4.c | 1 + gcc/testsuite/gcc.dg/packed-vla.c | 1 + gcc/testsuite/gcc.dg/pr31507-1.c | 1 + gcc/testsuite/gcc.dg/torture/pr48953.c | 1 + gcc/testsuite/gcc.dg/torture/pr8081.c | 1 + .../gcc.dg/torture/stackalign/alloca-1.c | 1 + .../gcc.dg/torture/stackalign/global-1.c | 1 + .../gcc.dg/torture/stackalign/inline-1.c | 1 + .../gcc.dg/torture/stackalign/inline-2.c | 1 + .../gcc.dg/torture/stackalign/nested-1.c | 1 + .../gcc.dg/torture/stackalign/nested-2.c | 1 + .../gcc.dg/torture/stackalign/nested-3.c | 1 + .../gcc.dg/torture/stackalign/nested-4.c | 1 + .../gcc.dg/torture/stackalign/pr16660-1.c | 1 + .../gcc.dg/torture/stackalign/pr16660-2.c | 1 + .../gcc.dg/torture/stackalign/pr16660-3.c | 1 + .../gcc.dg/torture/stackalign/ret-struct-1.c | 1 + .../gcc.dg/torture/stackalign/struct-1.c | 1 + .../gcc.dg/torture/stackalign/vararg-1.c | 1 + .../gcc.dg/torture/stackalign/vararg-2.c | 1 + gcc/testsuite/lib/target-supports.exp | 9 +++ 68 files changed, 148 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4c96eb6f7a0..16919877ba8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,74 @@ +2014-11-10 Bernd Schmidt + + * lib/target-supports.exp (check_effective_target_alloca): New function. + * gcc.c-torture/execute/20010209-1.c: Require alloca. + * gcc.c-torture/execute/20020314-1.c: Likewise. + * gcc.c-torture/execute/20020412-1.c: Likewise. + * gcc.c-torture/execute/20021113-1.c: Likewise. + * gcc.c-torture/execute/20040223-1.c: Likewise. + * gcc.c-torture/execute/20040308-1.c: Likewise. + * gcc.c-torture/execute/20040811-1.c: Likewise. + * gcc.c-torture/execute/20070824-1.c: Likewise. + * gcc.c-torture/execute/20070919-1.c: Likewise. + * gcc.c-torture/execute/built-in-setjmp.c: Likewise. + * gcc.c-torture/execute/pr22061-1.c: Likewise. + * gcc.c-torture/execute/pr22061-4.c: Likewise. + * gcc.c-torture/execute/pr43220.c: Likewise. + * gcc.c-torture/execute/vla-dealloc-1.c: Likewise. + * gcc.dg/torture/stackalign/alloca-1.c: Likewise. + * gcc.dg/torture/stackalign/vararg-1.c: Likewise. + * gcc.dg/torture/stackalign/vararg-2.c: Likewise. + * gcc.c-torture/compile/20000923-1.c: Likewise. + * gcc.c-torture/compile/20030224-1.c: Likewise. + * gcc.c-torture/compile/20071108-1.c: Likewise. + * gcc.c-torture/compile/20071117-1.c: Likewise. + * gcc.c-torture/compile/900313-1.c: Likewise. + * gcc.c-torture/compile/pr17397.c: Likewise. + * gcc.c-torture/compile/pr35006.c: Likewise. + * gcc.c-torture/compile/pr42956.c: Likewise. + * gcc.c-torture/compile/pr51354.c: Likewise. + * gcc.c-torture/compile/pr55851.c: Likewise. + * gcc.c-torture/compile/vla-const-1.c: Likewise. + * gcc.c-torture/compile/vla-const-2.c: Likewise. + * gcc.c-torture/compile/pr31507-1.c: Likewise. + * gcc.c-torture/compile/pr52714.c: Likewise. + * gcc.dg/20001012-2.c: Likewise. + * gcc.dg/auto-type-1.c: Likewise. + * gcc.dg/builtin-object-size-1.c: Likewise. + * gcc.dg/builtin-object-size-2.c: Likewise. + * gcc.dg/builtin-object-size-3.c: Likewise. + * gcc.dg/builtin-object-size-4.c: Likewise. + * gcc.dg/packed-vla.c: Likewise. + * gcc.c-torture/compile/parms.c: Likewise. + * gcc.c-torture/execute/920721-2.c: Skip -O0 unless alloca is available. + * gcc.c-torture/execute/920929-1.c: Likewise. + * gcc.c-torture/execute/921017-1.c: Likewise. + * gcc.c-torture/execute/941202-1.c: Likewise. + * gcc.c-torture/execute/align-nest.c: Likewise. + * gcc.c-torture/execute/alloca-1.c: Likewise. + * gcc.c-torture/execute/pr36321.c: Likewise. + * gcc.c-torture/compile/20001221-1.c: Likewise. + * gcc.c-torture/compile/20020807-1.c: Likewise. + * gcc.c-torture/compile/20050801-2.c: Likewise. + * gcc.c-torture/compile/920428-4.c: Likewise. + * gcc.c-torture/compile/debugvlafunction-1.c.c: Likewise. + * gcc.c-torture/compile/pr41469.c: Likewise. + * gcc.dg/torture/pr48953.c: Likewise. + * gcc.dg/torture/pr8081.c: Likewise. + * gcc.dg/torture/stackalign/inline-1.c: Skip if nvptx-*-*. + * gcc.dg/torture/stackalign/inline-2.c: Likewise. + * gcc.dg/torture/stackalign/nested-1.c: Likewise. + * gcc.dg/torture/stackalign/nested-2.c: Likewise. + * gcc.dg/torture/stackalign/nested-3.c: Likewise. + * gcc.dg/torture/stackalign/nested-4.c: Likewise. + * gcc.dg/torture/stackalign/nested-1.c: Likewise. + * gcc.dg/torture/stackalign/global-1.c: Likewise. + * gcc.dg/torture/stackalign/pr16660-1.c: Likewise. + * gcc.dg/torture/stackalign/pr16660-2.c: Likewise. + * gcc.dg/torture/stackalign/pr16660-3.c: Likewise. + * gcc.dg/torture/stackalign/ret-struct-1.c: Likewise. + * gcc.dg/torture/stackalign/struct-1.c: Likewise. + 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net> * g++.dg/cpp1y/feat-cxx11.C: Test new feature macros for C++98 diff --git a/gcc/testsuite/gcc.c-torture/compile/20000923-1.c b/gcc/testsuite/gcc.c-torture/compile/20000923-1.c index 9ed98868206..3244dc78300 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20000923-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20000923-1.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ const int a = 3; const int b = 50; diff --git a/gcc/testsuite/gcc.c-torture/compile/20001221-1.c b/gcc/testsuite/gcc.c-torture/compile/20001221-1.c index 66ae7141147..1adb0f8d1c1 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20001221-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20001221-1.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ static void foo () { diff --git a/gcc/testsuite/gcc.c-torture/compile/20020807-1.c b/gcc/testsuite/gcc.c-torture/compile/20020807-1.c index c1cc81504e8..605986a630d 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20020807-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20020807-1.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ int x; static int diff --git a/gcc/testsuite/gcc.c-torture/compile/20030224-1.c b/gcc/testsuite/gcc.c-torture/compile/20030224-1.c index 6832dc81e47..11bc3af9fc6 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20030224-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20030224-1.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ void zzz (char *s1, char *s2, int len, int *q) { int z = 5; diff --git a/gcc/testsuite/gcc.c-torture/compile/20050801-2.c b/gcc/testsuite/gcc.c-torture/compile/20050801-2.c index 45bd2a037be..ba8dabaa371 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20050801-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/20050801-2.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ __inline int f(int i) { struct { diff --git a/gcc/testsuite/gcc.c-torture/compile/20071108-1.c b/gcc/testsuite/gcc.c-torture/compile/20071108-1.c index b9a36ef65a7..25e71bf5f6b 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20071108-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20071108-1.c @@ -1,4 +1,5 @@ /* PR tree-optimization/33680 */ +/* { dg-require-effective-target alloca } */ int f (int dim, int *b, int *c) diff --git a/gcc/testsuite/gcc.c-torture/compile/20071117-1.c b/gcc/testsuite/gcc.c-torture/compile/20071117-1.c index efcd51269ba..43bc0989645 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20071117-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20071117-1.c @@ -1,4 +1,5 @@ /* PR middle-end/34134 */ +/* { dg-require-effective-target alloca } */ extern void bar (void *, int); diff --git a/gcc/testsuite/gcc.c-torture/compile/900313-1.c b/gcc/testsuite/gcc.c-torture/compile/900313-1.c index f2bc40d7242..2bac5814a7b 100644 --- a/gcc/testsuite/gcc.c-torture/compile/900313-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/900313-1.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ main () { char *a; diff --git a/gcc/testsuite/gcc.c-torture/compile/920428-4.c b/gcc/testsuite/gcc.c-torture/compile/920428-4.c index cc5e30c2a80..293c466dcbb 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920428-4.c +++ b/gcc/testsuite/gcc.c-torture/compile/920428-4.c @@ -1 +1,2 @@ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ x(a){struct{int p[a],i;}l;l.i;} diff --git a/gcc/testsuite/gcc.c-torture/compile/debugvlafunction-1.c b/gcc/testsuite/gcc.c-torture/compile/debugvlafunction-1.c index 3911f87bc94..14bf5790d04 100644 --- a/gcc/testsuite/gcc.c-torture/compile/debugvlafunction-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/debugvlafunction-1.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ extern void dynreplace_trampoline(void); extern void dynreplace_trampoline_endlabel(void); int dynreplace_add_trampoline(void) diff --git a/gcc/testsuite/gcc.c-torture/compile/parms.c b/gcc/testsuite/gcc.c-torture/compile/parms.c index 26c2c701756..8205a9c1454 100644 --- a/gcc/testsuite/gcc.c-torture/compile/parms.c +++ b/gcc/testsuite/gcc.c-torture/compile/parms.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ #define alloca __builtin_alloca x (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, x, y) diff --git a/gcc/testsuite/gcc.c-torture/compile/pr17397.c b/gcc/testsuite/gcc.c-torture/compile/pr17397.c index b857472f65f..6dde3c856be 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr17397.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr17397.c @@ -1,4 +1,5 @@ /* ICE due to invalid GIMPLE created during strlen simplification. */ +/* { dg-require-effective-target alloca } */ extern unsigned long strlen (__const char *__s); extern void bar (); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr35006.c b/gcc/testsuite/gcc.c-torture/compile/pr35006.c index 53de05cdb40..fc343da9dab 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr35006.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr35006.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ typedef unsigned long grub_uint64_t; typedef grub_uint64_t grub_size_t; grub_cmdline_get (unsigned max_len, int echo_char) diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41469.c b/gcc/testsuite/gcc.c-torture/compile/pr41469.c index b89ee6391bb..5917794cc34 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr41469.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr41469.c @@ -1,4 +1,5 @@ /* { dg-options "-fexceptions" } */ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ void af (void *a) diff --git a/gcc/testsuite/gcc.c-torture/compile/pr42956.c b/gcc/testsuite/gcc.c-torture/compile/pr42956.c index f592d4be4d7..ce03a8ff47e 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr42956.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr42956.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ typedef const int cint; typedef struct { } Bounds; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr51354.c b/gcc/testsuite/gcc.c-torture/compile/pr51354.c index 5b2abb0d421..354f40eb8fc 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr51354.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr51354.c @@ -1,4 +1,5 @@ /* PR target/51354 */ +/* { dg-require-effective-target alloca } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr52714.c b/gcc/testsuite/gcc.c-torture/compile/pr52714.c index 03d49908912..38a4ab57cef 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr52714.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr52714.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ int __re_compile_fastmap(unsigned char *p) { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55851.c b/gcc/testsuite/gcc.c-torture/compile/pr55851.c index 6198a7339cc..8d118b87e3a 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr55851.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr55851.c @@ -1,4 +1,5 @@ /* PR middle-end/55851 */ +/* { dg-require-effective-target alloca } */ enum { A = 1UL, B = -1UL } var = A; void foo (char *); diff --git a/gcc/testsuite/gcc.c-torture/compile/vla-const-1.c b/gcc/testsuite/gcc.c-torture/compile/vla-const-1.c index 6acc3d83050..c7c1dbee523 100644 --- a/gcc/testsuite/gcc.c-torture/compile/vla-const-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/vla-const-1.c @@ -1,5 +1,6 @@ /* Test TREE_CONSTANT VLA size: bug 27893. */ /* Origin: Joseph Myers */ +/* { dg-require-effective-target alloca } */ int a; void g(void *); void f(void) { int b[(__SIZE_TYPE__)&a]; g(b); } diff --git a/gcc/testsuite/gcc.c-torture/compile/vla-const-2.c b/gcc/testsuite/gcc.c-torture/compile/vla-const-2.c index 913a730b458..5bbd9b5ebdb 100644 --- a/gcc/testsuite/gcc.c-torture/compile/vla-const-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/vla-const-2.c @@ -1,4 +1,5 @@ /* Test TREE_CONSTANT VLA size: bug 27893. */ /* Origin: Joseph Myers */ +/* { dg-require-effective-target alloca } */ void g(void *); void f(void) { int b[1/0]; g(b); } diff --git a/gcc/testsuite/gcc.c-torture/execute/20010209-1.c b/gcc/testsuite/gcc.c-torture/execute/20010209-1.c index e04d605ed63..1df7332f209 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20010209-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20010209-1.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ int b; int foo (void) { diff --git a/gcc/testsuite/gcc.c-torture/execute/20020314-1.c b/gcc/testsuite/gcc.c-torture/execute/20020314-1.c index 28288c82c8b..2f68ae8ff6d 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20020314-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20020314-1.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ void f(void * a, double y) { } diff --git a/gcc/testsuite/gcc.c-torture/execute/20020412-1.c b/gcc/testsuite/gcc.c-torture/execute/20020412-1.c index df0efe008ad..58205d23d5b 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20020412-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20020412-1.c @@ -1,6 +1,7 @@ /* PR c/3711 This testcase ICEd on IA-32 at -O0 and was miscompiled otherwise, because std_expand_builtin_va_arg didn't handle variable size types. */ +/* { dg-require-effective-target alloca } */ #include diff --git a/gcc/testsuite/gcc.c-torture/execute/20021113-1.c b/gcc/testsuite/gcc.c-torture/execute/20021113-1.c index 420926d7548..8226d3a8566 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20021113-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20021113-1.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target alloca } */ + /* This program tests a data flow bug that would cause constant propagation to propagate constants through function calls. */ diff --git a/gcc/testsuite/gcc.c-torture/execute/20040223-1.c b/gcc/testsuite/gcc.c-torture/execute/20040223-1.c index 940ec0dcffa..c295e4b09ea 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20040223-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20040223-1.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ #include #include diff --git a/gcc/testsuite/gcc.c-torture/execute/20040308-1.c b/gcc/testsuite/gcc.c-torture/execute/20040308-1.c index 4c63535e7f7..4277a5068be 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20040308-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20040308-1.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ /* This used to fail on SPARC with an unaligned memory access. */ void foo(int n) diff --git a/gcc/testsuite/gcc.c-torture/execute/20040811-1.c b/gcc/testsuite/gcc.c-torture/execute/20040811-1.c index 0122825323a..f7a4de93dbf 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20040811-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20040811-1.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target int32plus } */ +/* { dg-require-effective-target alloca } */ /* Ensure that we deallocate X when branching back before its declaration. */ diff --git a/gcc/testsuite/gcc.c-torture/execute/20070824-1.c b/gcc/testsuite/gcc.c-torture/execute/20070824-1.c index 74eb58c05b9..4842bfe218c 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20070824-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20070824-1.c @@ -1,4 +1,5 @@ /* PR tree-optimization/33136 */ +/* { dg-require-effective-target alloca } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.c-torture/execute/20070919-1.c b/gcc/testsuite/gcc.c-torture/execute/20070919-1.c index ade3d7e8e11..d3e76932df1 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20070919-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20070919-1.c @@ -1,4 +1,5 @@ /* PR c/33238 */ +/* { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t; int memcmp (const void *, const void *, size_t); diff --git a/gcc/testsuite/gcc.c-torture/execute/920721-2.c b/gcc/testsuite/gcc.c-torture/execute/920721-2.c index ed4e0bf8700..cfad0e9bbff 100644 --- a/gcc/testsuite/gcc.c-torture/execute/920721-2.c +++ b/gcc/testsuite/gcc.c-torture/execute/920721-2.c @@ -1,2 +1,3 @@ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ f(){} main(){int n=2;double x[n];f();exit(0);} diff --git a/gcc/testsuite/gcc.c-torture/execute/920929-1.c b/gcc/testsuite/gcc.c-torture/execute/920929-1.c index e43444e31d7..061617df753 100644 --- a/gcc/testsuite/gcc.c-torture/execute/920929-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/920929-1.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ /* REPRODUCED:RUN:SIGNAL MACHINE:sparc OPTIONS: */ f(int n) { diff --git a/gcc/testsuite/gcc.c-torture/execute/921017-1.c b/gcc/testsuite/gcc.c-torture/execute/921017-1.c index ab68fc08498..c7fab5840b3 100644 --- a/gcc/testsuite/gcc.c-torture/execute/921017-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/921017-1.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ f(n) { int a[n]; diff --git a/gcc/testsuite/gcc.c-torture/execute/941202-1.c b/gcc/testsuite/gcc.c-torture/execute/941202-1.c index 72d0b33e924..b97ae0e34a7 100644 --- a/gcc/testsuite/gcc.c-torture/execute/941202-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/941202-1.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ g (x, y) { if (x != 3) diff --git a/gcc/testsuite/gcc.c-torture/execute/align-nest.c b/gcc/testsuite/gcc.c-torture/execute/align-nest.c index 2ff2952c70c..5298b09366d 100644 --- a/gcc/testsuite/gcc.c-torture/execute/align-nest.c +++ b/gcc/testsuite/gcc.c-torture/execute/align-nest.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ void foo(int n) { diff --git a/gcc/testsuite/gcc.c-torture/execute/alloca-1.c b/gcc/testsuite/gcc.c-torture/execute/alloca-1.c index a8d1384c6ec..6a65ddfe914 100644 --- a/gcc/testsuite/gcc.c-torture/execute/alloca-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/alloca-1.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ /* Verify that alloca storage is sufficiently aligned. */ /* ??? May fail if BIGGEST_ALIGNMENT > STACK_BOUNDARY. Which, I guess can only happen on !STRICT_ALIGNMENT targets. */ diff --git a/gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c b/gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c index 9da787884dd..4370c3d07ae 100644 --- a/gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c +++ b/gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target alloca } */ + extern int strcmp(const char *, const char *); extern char *strcpy(char *, const char *); extern void abort(void); diff --git a/gcc/testsuite/gcc.c-torture/execute/pr22061-1.c b/gcc/testsuite/gcc.c-torture/execute/pr22061-1.c index 65375fecbc6..ffd6ccc7b46 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr22061-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr22061-1.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ int N = 1; void foo() {} /* Necessary to trigger the original ICE. */ void bar (char a[2][N]) { a[1][0] = N; } diff --git a/gcc/testsuite/gcc.c-torture/execute/pr22061-4.c b/gcc/testsuite/gcc.c-torture/execute/pr22061-4.c index 38ce3e8c507..f7c89e631be 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr22061-4.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr22061-4.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ void bar (int N) { diff --git a/gcc/testsuite/gcc.c-torture/execute/pr36321.c b/gcc/testsuite/gcc.c-torture/execute/pr36321.c index 1edf8e41525..4af993dc0fd 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr36321.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr36321.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ extern void abort (void); extern __SIZE_TYPE__ strlen (const char *); diff --git a/gcc/testsuite/gcc.c-torture/execute/pr43220.c b/gcc/testsuite/gcc.c-torture/execute/pr43220.c index 0d6ebfb2734..d61dfe8fa35 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr43220.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr43220.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target int32plus } */ +/* { dg-require-effective-target alloca } */ void *volatile p; diff --git a/gcc/testsuite/gcc.c-torture/execute/vla-dealloc-1.c b/gcc/testsuite/gcc.c-torture/execute/vla-dealloc-1.c index 9eb95c1b4e6..3b74b85a10e 100644 --- a/gcc/testsuite/gcc.c-torture/execute/vla-dealloc-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/vla-dealloc-1.c @@ -1,5 +1,6 @@ /* VLAs should be deallocated on a jump to before their definition, including a jump to a label in an inner scope. PR 19771. */ +/* { dg-require-effective-target alloca } */ #if (__SIZEOF_INT__ <= 2) #define LIMIT 10000 diff --git a/gcc/testsuite/gcc.dg/20001012-2.c b/gcc/testsuite/gcc.dg/20001012-2.c index 629ae1b3773..e7a4fb8da7a 100644 --- a/gcc/testsuite/gcc.dg/20001012-2.c +++ b/gcc/testsuite/gcc.dg/20001012-2.c @@ -1,5 +1,6 @@ /* { dg-do run { target fpic } } */ /* { dg-options "-O2 -fpic" } */ +/* { dg-require-effective-target alloca } */ extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.dg/auto-type-1.c b/gcc/testsuite/gcc.dg/auto-type-1.c index f47693abbf3..882bf2c13fb 100644 --- a/gcc/testsuite/gcc.dg/auto-type-1.c +++ b/gcc/testsuite/gcc.dg/auto-type-1.c @@ -1,6 +1,7 @@ /* Test __auto_type. Test correct uses. */ /* { dg-do run } */ /* { dg-options "" } */ +/* { dg-require-effective-target alloca } */ extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-1.c b/gcc/testsuite/gcc.dg/builtin-object-size-1.c index 13ebeb15b25..264ef755189 100644 --- a/gcc/testsuite/gcc.dg/builtin-object-size-1.c +++ b/gcc/testsuite/gcc.dg/builtin-object-size-1.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ +/* { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t; extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-2.c b/gcc/testsuite/gcc.dg/builtin-object-size-2.c index 21aff5a958d..ad2dd296a9a 100644 --- a/gcc/testsuite/gcc.dg/builtin-object-size-2.c +++ b/gcc/testsuite/gcc.dg/builtin-object-size-2.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ +/* { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t; extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-3.c b/gcc/testsuite/gcc.dg/builtin-object-size-3.c index 572ecda0436..d5ca5047ee9 100644 --- a/gcc/testsuite/gcc.dg/builtin-object-size-3.c +++ b/gcc/testsuite/gcc.dg/builtin-object-size-3.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ +/* { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t; extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-4.c b/gcc/testsuite/gcc.dg/builtin-object-size-4.c index 1eb30d1ba53..c22654dea2a 100644 --- a/gcc/testsuite/gcc.dg/builtin-object-size-4.c +++ b/gcc/testsuite/gcc.dg/builtin-object-size-4.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ +/* { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t; extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/packed-vla.c b/gcc/testsuite/gcc.dg/packed-vla.c index 04ccb96636d..e673b729b54 100644 --- a/gcc/testsuite/gcc.dg/packed-vla.c +++ b/gcc/testsuite/gcc.dg/packed-vla.c @@ -1,6 +1,7 @@ /* PR middle-end/27945 */ /* { dg-do run } */ /* { dg-options "" } */ +/* { dg-require-effective-target alloca } */ extern int printf (const char *, ...); extern void abort (); diff --git a/gcc/testsuite/gcc.dg/pr31507-1.c b/gcc/testsuite/gcc.dg/pr31507-1.c index dbba1e1fcdb..f6a7e747dbf 100644 --- a/gcc/testsuite/gcc.dg/pr31507-1.c +++ b/gcc/testsuite/gcc.dg/pr31507-1.c @@ -1,6 +1,7 @@ /* PR target/31507 */ /* { dg-do run } */ /* { dg-options "-Os -fno-omit-frame-pointer" } */ +/* { dg-require-effective-target alloca } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/torture/pr48953.c b/gcc/testsuite/gcc.dg/torture/pr48953.c index 41a3d7b8082..e5c8d6723b2 100644 --- a/gcc/testsuite/gcc.dg/torture/pr48953.c +++ b/gcc/testsuite/gcc.dg/torture/pr48953.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-fno-tree-dce" } */ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ static inline int foo (int n, int k) { diff --git a/gcc/testsuite/gcc.dg/torture/pr8081.c b/gcc/testsuite/gcc.dg/torture/pr8081.c index 008ec5a1428..0046655f0d3 100644 --- a/gcc/testsuite/gcc.dg/torture/pr8081.c +++ b/gcc/testsuite/gcc.dg/torture/pr8081.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */ extern void abort (void); int diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/alloca-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/alloca-1.c index e226e7f0371..6a35c9da8c3 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/alloca-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/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/gcc.dg/torture/stackalign/global-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/global-1.c index 332103a7633..91983f5513b 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/global-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/global-1.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ +/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c index 38127fd503a..9f3db0359e5 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ +/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/inline-2.c b/gcc/testsuite/gcc.dg/torture/stackalign/inline-2.c index 85a2ee3f3cc..f838435c758 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/inline-2.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/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/gcc.dg/torture/stackalign/nested-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c index 8402f95f594..ea53330cb7a 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ +/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c b/gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c index dabc310d752..ecfdcb01746 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ +/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/nested-3.c b/gcc/testsuite/gcc.dg/torture/stackalign/nested-3.c index 917bdc37acb..631cc929e88 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/nested-3.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/nested-3.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/gcc.dg/torture/stackalign/nested-4.c b/gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c index 05cb83301a3..0e94d2cc529 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ +/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c index b917e824b62..0eef809be01 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ +/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-2.c b/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-2.c index 9a039eb2bf5..ee3dd74dc60 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-2.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-2.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-3.c b/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-3.c index 1c1ddd1dd74..dc5abf278c1 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-3.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-3.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c index b218a14edf6..bb1b4a1e6c9 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ +/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c index 86021329894..d0420ae23ce 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ +/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/vararg-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/vararg-1.c index 5b36f2cd4cc..22d4f77356e 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/vararg-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/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/gcc.dg/torture/stackalign/vararg-2.c b/gcc/testsuite/gcc.dg/torture/stackalign/vararg-2.c index 6740e994e2f..c678b519495 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/vararg-2.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/vararg-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 #include "check.h" diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 5e5338de168..b6e2dded682 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -599,6 +599,15 @@ proc add_options_for_tls { flags } { return $flags } +# Return 1 if alloca is supported, 0 otherwise. + +proc check_effective_target_alloca {} { + if { [istarget nvptx-*-*] } { + return 0 + } + return 1 +} + # Return 1 if thread local storage (TLS) is supported, 0 otherwise. proc check_effective_target_tls {} { -- 2.30.2