2015-08-22  Nathan Sidwell  <nathan@acm.org>

	* c-c++-common/Wsizeof-pointer-memaccess1.c: Require alloca.
	* c-c++-common/Wsizeof-pointer-memaccess2.c: Likewise.
	* c-c++-common/Wunused-var-8.c: Likewise.
	* c-c++-common/gomp/pr61486-2.c: Likewise.
	* c-c++-common/Wunused-var-6.c: Likewise.
	* c-c++-common/goacc/reduction-1.c: Likewise.
	* c-c++-common/goacc/reduction-2.c: Likewise.
	* c-c++-common/goacc/reduction-3.c: Likewise.
	* c-c++-common/goacc/reduction-4.c: Likewise.
	* gcc.dg/builtins-64.c: Likewise.
	* gcc.dg/pr59523.c: Likewise.
	* gcc.dg/tree-ssa/20080530.c: Likewise.
	* gcc.dg/tree-ssa/pr23848-2.c: Likewise.
	* gcc.dg/tree-ssa/pr23848-4.c: Likewise.
	* gcc.dg/tree-ssa/pr23848-1.c: Likewise.
	* gcc.dg/tree-ssa/pr23848-3.c: Likewise.
	* gcc.dg/tree-ssa/20030807-2.c: Likewise.
	* gcc.dg/pr59011.c: Likewise.
	* gcc.dg/uninit-9.c: Likewise.
	* gcc.dg/pr61561.c: Likewise.
	* gcc.dg/vla-4.c: Likewise.
	* gcc.dg/20101010-1.c: Likewise.
	* gcc.dg/pr49120.c: Likewise.
	* gcc.dg/20030331-2.c: Likewise.
	* gcc.dg/compat/struct-by-value-22_main.c: Likewise.
	* gcc.dg/pr25682.c: Likewise.
	* gcc.dg/guality/guality.c: Likewise.
	* gcc.dg/pr27301.c: Likewise.
	* gcc.dg/uninit-9-O0.c: Likewise.
	* gcc.dg/fold-alloca-1.c: Likewise.
	* gcc.dg/pr41470.c: Likewise.
	* gcc.dg/pr51491-2.c: Likewise.
	* gcc.dg/winline-7.c: Likewise.
	* gcc.dg/vla-2.c: Likewise.
	* gcc.dg/pr50764.c: Likewise.
	* gcc.dg/c99-vla-1.c: Likewise.
	* gcc.dg/pr33238.c: Likewise.
	* gcc.dg/c99-const-expr-13.c: Likewise.
	* gcc.dg/builtin-return-1.c: Likewise.
	* gcc.dg/vla-3.c: Likewise.
	* gcc.dg/20020415-1.c: Likewise.
	* gcc.dg/Wsizeof-pointer-memaccess1.c: Likewise.
	* gcc.dg/shrink-wrap-alloca.c: Likewise.
	* gcc.dg/Wstrict-aliasing-bogus-vla-1.c: Likewise.
	* gcc.dg/torture/calleesave-sse.c: Likewise.
	* gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Likewise.
	* gcc.dg/gomp/vla-2.c: Likewise.
	* gcc.dg/gomp/vla-3.c: Likewise.
	* gcc.dg/gomp/vla-4.c: Likewise.
	* gcc.dg/gomp/pr30494.c: Likewise.
	* gcc.dg/gomp/vla-5.c: Likewise.
	* gcc.dg/pr51990-2.c: Likewise.
	* gcc.dg/vla-22.c: Likewise.

Index: gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess1.c
===================================================================
--- gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess1.c	(revision 227083)
+++ gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess1.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-do compile } */
 /* { dg-options "-Wall -Wno-sizeof-array-argument" } */
 /* { dg-options "-Wall -Wno-sizeof-array-argument -Wno-c++-compat" { target c } } */
+/* { dg-require-effective-target alloca } */
 
 typedef __SIZE_TYPE__ size_t;
 #ifdef __cplusplus
Index: gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c
===================================================================
--- gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c	(revision 227083)
+++ gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-do compile } */
 /* { dg-options "-Wall -O2 -Wno-sizeof-array-argument" } */
 /* { dg-options "-Wall -O2 -Wno-sizeof-array-argument -Wno-c++-compat" {target c} } */
+/* { dg-require-effective-target alloca } */
 
 #define bos(ptr) __builtin_object_size (ptr, 1)
 #define bos0(ptr) __builtin_object_size (ptr, 0)
Index: gcc/testsuite/c-c++-common/Wunused-var-8.c
===================================================================
--- gcc/testsuite/c-c++-common/Wunused-var-8.c	(revision 227083)
+++ gcc/testsuite/c-c++-common/Wunused-var-8.c	(working copy)
@@ -1,6 +1,7 @@
 /* Origin: PR c++/44108 */
 /* { dg-options "-Wunused" } */
 /* { dg-do compile } */
+/* { dg-require-effective-target alloca } */
 
 int
 foo ()
Index: gcc/testsuite/c-c++-common/gomp/pr61486-2.c
===================================================================
--- gcc/testsuite/c-c++-common/gomp/pr61486-2.c	(revision 227083)
+++ gcc/testsuite/c-c++-common/gomp/pr61486-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR middle-end/61486 */
 /* { dg-do compile } */
 /* { dg-options "-fopenmp" } */
+/* { dg-require-effective-target alloca } */
 
 #pragma omp declare target
 void dosomething (int *a, int n, int m);
Index: gcc/testsuite/c-c++-common/Wunused-var-6.c
===================================================================
--- gcc/testsuite/c-c++-common/Wunused-var-6.c	(revision 227083)
+++ gcc/testsuite/c-c++-common/Wunused-var-6.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR c/43981 */
 /* { dg-do compile } */
 /* { dg-options "-Wunused" } */
+/* { dg-require-effective-target alloca } */
 
 void g (char *);
 
Index: gcc/testsuite/c-c++-common/goacc/reduction-1.c
===================================================================
--- gcc/testsuite/c-c++-common/goacc/reduction-1.c	(revision 227083)
+++ gcc/testsuite/c-c++-common/goacc/reduction-1.c	(working copy)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 /* Integer reductions.  */
 
 #define vl 32
Index: gcc/testsuite/c-c++-common/goacc/reduction-2.c
===================================================================
--- gcc/testsuite/c-c++-common/goacc/reduction-2.c	(revision 227083)
+++ gcc/testsuite/c-c++-common/goacc/reduction-2.c	(working copy)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 /* float reductions.  */
 
 #define vl 32
Index: gcc/testsuite/c-c++-common/goacc/reduction-3.c
===================================================================
--- gcc/testsuite/c-c++-common/goacc/reduction-3.c	(revision 227083)
+++ gcc/testsuite/c-c++-common/goacc/reduction-3.c	(working copy)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 /* double reductions.  */
 
 #define vl 32
Index: gcc/testsuite/c-c++-common/goacc/reduction-4.c
===================================================================
--- gcc/testsuite/c-c++-common/goacc/reduction-4.c	(revision 227083)
+++ gcc/testsuite/c-c++-common/goacc/reduction-4.c	(working copy)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 /* complex reductions.  */
 
 #define vl 32
Index: gcc/testsuite/gcc.dg/builtins-64.c
===================================================================
--- gcc/testsuite/gcc.dg/builtins-64.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/builtins-64.c	(working copy)
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-require-effective-target alloca } */
 
 int main ()
 {
Index: gcc/testsuite/gcc.dg/pr59523.c
===================================================================
--- gcc/testsuite/gcc.dg/pr59523.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/pr59523.c	(working copy)
@@ -2,6 +2,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O3" } */
 /* { dg-additional-options "-mavx2" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-require-effective-target alloca } */
 
 int *
 foo (int a, int *b, int *c, int *d)
Index: gcc/testsuite/gcc.dg/tree-ssa/20080530.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/20080530.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/tree-ssa/20080530.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-einline" } */
+/* { dg-require-effective-target alloca } */
 
 void bar (char *);
 int i;
Index: gcc/testsuite/gcc.dg/tree-ssa/pr23848-2.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr23848-2.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23848-2.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR middle-end/23848 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-require-effective-target alloca } */
 
 void bar (char *, char *, char *, char *, int);
 void foo (int size)
Index: gcc/testsuite/gcc.dg/tree-ssa/pr23848-4.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr23848-4.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23848-4.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR middle-end/23848 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-require-effective-target alloca } */
 
 void bar (char *, char *, char *, char *, int);
 void foo (int size)
Index: gcc/testsuite/gcc.dg/tree-ssa/pr23848-1.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr23848-1.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23848-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR middle-end/23848 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-require-effective-target alloca } */
 
 void bar1 (char *, int);
 void foo1 (int size)
Index: gcc/testsuite/gcc.dg/tree-ssa/pr23848-3.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr23848-3.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23848-3.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR middle-end/23848 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-require-effective-target alloca } */
 
 void bar (int, char *, char *, char *, char *, int);
 void foo (int size)
Index: gcc/testsuite/gcc.dg/tree-ssa/20030807-2.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/20030807-2.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/tree-ssa/20030807-2.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O1 -ftree-vrp -fdump-tree-dom2" } */
+/* { dg-require-effective-target alloca } */
      
 extern void abort (void);
 extern void bitmap_clear (int *);
Index: gcc/testsuite/gcc.dg/pr59011.c
===================================================================
--- gcc/testsuite/gcc.dg/pr59011.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/pr59011.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR middle-end/59011 */
 /* { dg-do compile } */
 /* { dg-options "-std=gnu99" } */
+/* { dg-require-effective-target alloca } */
 
 void
 foo (int m)
Index: gcc/testsuite/gcc.dg/uninit-9.c
===================================================================
--- gcc/testsuite/gcc.dg/uninit-9.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/uninit-9.c	(working copy)
@@ -3,6 +3,7 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O -Wuninitialized" } */
+/* { dg-require-effective-target alloca } */
 
 struct foo
 {
Index: gcc/testsuite/gcc.dg/pr61561.c
===================================================================
--- gcc/testsuite/gcc.dg/pr61561.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/pr61561.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR c/61561.  */
 /* { dg-do assemble } */
 /* { dg-options " -w -O2" } */
+/* { dg-require-effective-target alloca } */
 
 int dummy (int a);
 
Index: gcc/testsuite/gcc.dg/vla-4.c
===================================================================
--- gcc/testsuite/gcc.dg/vla-4.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/vla-4.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-std=c99 -pedantic-errors" } */
+/* { dg-require-effective-target alloca } */
 /* PR c/18740 */
 
 static int i;
Index: gcc/testsuite/gcc.dg/20101010-1.c
===================================================================
--- gcc/testsuite/gcc.dg/20101010-1.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/20101010-1.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-crossjumping" } */
+/* { dg-require-effective-target alloca } */
 
 int bar1 ();
 int bar2 ();
Index: gcc/testsuite/gcc.dg/pr49120.c
===================================================================
--- gcc/testsuite/gcc.dg/pr49120.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/pr49120.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR c/49120 */
 /* { dg-do compile } */
 /* { dg-options "-Wall" } */
+/* { dg-require-effective-target alloca } */
 
 int
 main ()
Index: gcc/testsuite/gcc.dg/20030331-2.c
===================================================================
--- gcc/testsuite/gcc.dg/20030331-2.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/20030331-2.c	(working copy)
@@ -1,4 +1,5 @@
 // { dg-options "" }
+/* { dg-require-effective-target alloca } */
 
 extern int printf (const char *, ...);
 
Index: gcc/testsuite/gcc.dg/compat/struct-by-value-22_main.c
===================================================================
--- gcc/testsuite/gcc.dg/compat/struct-by-value-22_main.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/compat/struct-by-value-22_main.c	(working copy)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 /* Test variable sized function argument passing.
    GCC 3.2 and earlier is incompatible with GCC 3.3+ on x86-64,
    the latter passes variable sized arguments by reference while
Index: gcc/testsuite/gcc.dg/pr25682.c
===================================================================
--- gcc/testsuite/gcc.dg/pr25682.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/pr25682.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR c/25682 */
 /* { dg-do compile } */
 /* { dg-options "-ansi" } */
+/* { dg-require-effective-target alloca } */
 /* Test whether we don't ICE on questionable constructs where offsetof
    should have been used instead.  */
 
Index: gcc/testsuite/gcc.dg/guality/guality.c
===================================================================
--- gcc/testsuite/gcc.dg/guality/guality.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/guality/guality.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do run { xfail *-*-* } } */
 /* { dg-options "-g" } */
+/* { dg-require-effective-target alloca } */
 
 #include "guality.h"
 
Index: gcc/testsuite/gcc.dg/pr27301.c
===================================================================
--- gcc/testsuite/gcc.dg/pr27301.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/pr27301.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR c/27301 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -std=gnu89" } */
+/* { dg-require-effective-target alloca } */
 
 void
 foo (void *ptr, long n)
Index: gcc/testsuite/gcc.dg/uninit-9-O0.c
===================================================================
--- gcc/testsuite/gcc.dg/uninit-9-O0.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/uninit-9-O0.c	(working copy)
@@ -3,6 +3,7 @@
 
 /* { dg-do compile } */
 /* { dg-options "-Wuninitialized" } */
+/* { dg-require-effective-target alloca } */
 
 struct foo
 {
Index: gcc/testsuite/gcc.dg/fold-alloca-1.c
===================================================================
--- gcc/testsuite/gcc.dg/fold-alloca-1.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/fold-alloca-1.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fdump-tree-cfg" } */
+/* { dg-require-effective-target alloca } */
 
 void *alloca (__SIZE_TYPE__);
 void link_error ();
Index: gcc/testsuite/gcc.dg/pr41470.c
===================================================================
--- gcc/testsuite/gcc.dg/pr41470.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/pr41470.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fexceptions" } */
+/* { dg-require-effective-target alloca } */
 
 void cf (void *);
 
Index: gcc/testsuite/gcc.dg/pr51491-2.c
===================================================================
--- gcc/testsuite/gcc.dg/pr51491-2.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/pr51491-2.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-ccp1" } */
+/* { dg-require-effective-target alloca } */
 
 int g (int *);
 
Index: gcc/testsuite/gcc.dg/winline-7.c
===================================================================
--- gcc/testsuite/gcc.dg/winline-7.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/winline-7.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-Winline -O2 -fgnu89-inline" } */
+/* { dg-require-effective-target alloca } */
 
 extern void *alloca (__SIZE_TYPE__);
 
Index: gcc/testsuite/gcc.dg/vla-2.c
===================================================================
--- gcc/testsuite/gcc.dg/vla-2.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/vla-2.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-std=gnu99" } */
+/* { dg-require-effective-target alloca } */
 
 /* These are crash tests related to PR middle-end/6994; see also
    g++.dg/ext/vla1.C.  Note that at present A and C cannot be inlined.  */
Index: gcc/testsuite/gcc.dg/pr50764.c
===================================================================
--- gcc/testsuite/gcc.dg/pr50764.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/pr50764.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fsched2-use-superblocks -ftree-tail-merge" } */
+/* { dg-require-effective-target alloca } */
 
 typedef int aligned __attribute__ ((aligned (64)));
 extern void abort (void);
Index: gcc/testsuite/gcc.dg/c99-vla-1.c
===================================================================
--- gcc/testsuite/gcc.dg/c99-vla-1.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/c99-vla-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* Origin: PR 3467 */
 /* { dg-do compile } */
 /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+/* { dg-require-effective-target alloca } */
 
 void
 tdef (int n)
Index: gcc/testsuite/gcc.dg/pr33238.c
===================================================================
--- gcc/testsuite/gcc.dg/pr33238.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/pr33238.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR c/33238 */
 /* { dg-do compile } */
 /* { dg-options "-std=gnu89" } */
+/* { dg-require-effective-target alloca } */
 
 void
 reverse (void *x, int y, int z)
Index: gcc/testsuite/gcc.dg/c99-const-expr-13.c
===================================================================
--- gcc/testsuite/gcc.dg/c99-const-expr-13.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/c99-const-expr-13.c	(working copy)
@@ -3,6 +3,7 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-options "-std=iso9899:1999 -pedantic-errors -frounding-math" } */
+/* { dg-require-effective-target alloca } */
 
 void
 f (void)
Index: gcc/testsuite/gcc.dg/builtin-return-1.c
===================================================================
--- gcc/testsuite/gcc.dg/builtin-return-1.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/builtin-return-1.c	(working copy)
@@ -2,6 +2,7 @@
 /* Originator: Andrew Church <gcczilla@achurch.org> */
 /* { dg-do run } */
 /* { dg-xfail-run-if "PR36571 untyped return is char register" { "avr-*-*" } { "*" } { "" } } */
+/* { dg-require-effective-target alloca } */
 /* This used to fail on SPARC because the (undefined) return
    value of 'bar' was overwriting that of 'foo'.  */
 
Index: gcc/testsuite/gcc.dg/vla-3.c
===================================================================
--- gcc/testsuite/gcc.dg/vla-3.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/vla-3.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-std=gnu99" } */
+/* { dg-require-effective-target alloca } */
 
 /* This used to crash as we did not preserve the correct type
    for __SIZE_TYPE__. See PR22439. */
Index: gcc/testsuite/gcc.dg/20020415-1.c
===================================================================
--- gcc/testsuite/gcc.dg/20020415-1.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/20020415-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR target/6303
    This testcase ICEd because s390 did not define
    ASM_SIMPLIFY_DWARF_ADDR hook.  */
+/* { dg-require-effective-target alloca } */
 /* { dg-do compile { target fpic } } */
 /* { dg-options "-O2 -fpic -g" } */
 
Index: gcc/testsuite/gcc.dg/Wsizeof-pointer-memaccess1.c
===================================================================
--- gcc/testsuite/gcc.dg/Wsizeof-pointer-memaccess1.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/Wsizeof-pointer-memaccess1.c	(working copy)
@@ -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 void bzero (void *, size_t);
Index: gcc/testsuite/gcc.dg/shrink-wrap-alloca.c
===================================================================
--- gcc/testsuite/gcc.dg/shrink-wrap-alloca.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/shrink-wrap-alloca.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -g" } */
+/* { dg-require-effective-target alloca } */
 
 int *p;
 
Index: gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-vla-1.c
===================================================================
--- gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-vla-1.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-vla-1.c	(working copy)
@@ -1,6 +1,7 @@
 /* PR 41673: bogus -Wstrict-aliasing warning from VLA dereference.  */
 /* { dg-do compile } */
 /* { dg-options "-std=gnu99 -O2 -Wall" } */
+/* { dg-require-effective-target alloca } */
 
 int main(int argc, char *argv[])
 {
Index: gcc/testsuite/gcc.dg/torture/calleesave-sse.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/calleesave-sse.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/torture/calleesave-sse.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fno-omit-frame-pointer" } */
+/* { dg-require-effective-target alloca } */
 
 #define alloca __builtin_alloca
 extern void abort (void);
Index: gcc/testsuite/gcc.dg/torture/Wsizeof-pointer-memaccess1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/Wsizeof-pointer-memaccess1.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/torture/Wsizeof-pointer-memaccess1.c	(working copy)
@@ -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 } */
 
 typedef __SIZE_TYPE__ size_t;
 extern void *memset (void *, int, size_t);
Index: gcc/testsuite/gcc.dg/gomp/vla-2.c
===================================================================
--- gcc/testsuite/gcc.dg/gomp/vla-2.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/gomp/vla-2.c	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+/* { dg-require-effective-target alloca } */
 
 void foo(int n, int i)
 {
Index: gcc/testsuite/gcc.dg/gomp/vla-3.c
===================================================================
--- gcc/testsuite/gcc.dg/gomp/vla-3.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/gomp/vla-3.c	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+/* { dg-require-effective-target alloca } */
 
 void foo(int n, int i)
 {
Index: gcc/testsuite/gcc.dg/gomp/vla-4.c
===================================================================
--- gcc/testsuite/gcc.dg/gomp/vla-4.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/gomp/vla-4.c	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+/* { dg-require-effective-target alloca } */
 
 void foo(int n, int i)
 {
Index: gcc/testsuite/gcc.dg/gomp/pr30494.c
===================================================================
--- gcc/testsuite/gcc.dg/gomp/pr30494.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/gomp/pr30494.c	(working copy)
@@ -1,5 +1,6 @@
 /* PR middle-end/30494 */
 /* { dg-do compile } */
+/* { dg-require-effective-target alloca } */
 
 int
 foo (int n)
Index: gcc/testsuite/gcc.dg/gomp/vla-5.c
===================================================================
--- gcc/testsuite/gcc.dg/gomp/vla-5.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/gomp/vla-5.c	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+/* { dg-require-effective-target alloca } */
 
 void foo(int n, int i)
 {
Index: gcc/testsuite/gcc.dg/pr51990-2.c
===================================================================
--- gcc/testsuite/gcc.dg/pr51990-2.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/pr51990-2.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
 
 int y;
 extern int foo (int, ...) __attribute__((pure));
Index: gcc/testsuite/gcc.dg/vla-22.c
===================================================================
--- gcc/testsuite/gcc.dg/vla-22.c	(revision 227083)
+++ gcc/testsuite/gcc.dg/vla-22.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
 
 extern void bar (int *);
 
Index: gcc/config/nvptx/nvptx.md
===================================================================
--- gcc/config/nvptx/nvptx.md	(revision 227083)
+++ gcc/config/nvptx/nvptx.md	(working copy)
@@ -1241,6 +1241,12 @@
    (match_operand 1 "nvptx_register_operand")]
   ""
 {
+  /* The ptx documentation specifies an alloca intrinsic (for 32 bit
+     only)  but notes it is not implemented.  The assembler emits a
+     confused error message.  Issue a blunt one now instead.  */
+  sorry ("target cannot support alloca.");
+  emit_insn (gen_nop ());
+  DONE;
   if (TARGET_ABI64)
     emit_insn (gen_allocate_stack_di (operands[0], operands[1]));
   else
