Testsuite alloca fixes for ptx.
authorBernd Schmidt <bernds@codesourcery.com>
Mon, 10 Nov 2014 16:30:09 +0000 (16:30 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Mon, 10 Nov 2014 16:30:09 +0000 (16:30 +0000)
* 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

68 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20000923-1.c
gcc/testsuite/gcc.c-torture/compile/20001221-1.c
gcc/testsuite/gcc.c-torture/compile/20020807-1.c
gcc/testsuite/gcc.c-torture/compile/20030224-1.c
gcc/testsuite/gcc.c-torture/compile/20050801-2.c
gcc/testsuite/gcc.c-torture/compile/20071108-1.c
gcc/testsuite/gcc.c-torture/compile/20071117-1.c
gcc/testsuite/gcc.c-torture/compile/900313-1.c
gcc/testsuite/gcc.c-torture/compile/920428-4.c
gcc/testsuite/gcc.c-torture/compile/debugvlafunction-1.c
gcc/testsuite/gcc.c-torture/compile/parms.c
gcc/testsuite/gcc.c-torture/compile/pr17397.c
gcc/testsuite/gcc.c-torture/compile/pr35006.c
gcc/testsuite/gcc.c-torture/compile/pr41469.c
gcc/testsuite/gcc.c-torture/compile/pr42956.c
gcc/testsuite/gcc.c-torture/compile/pr51354.c
gcc/testsuite/gcc.c-torture/compile/pr52714.c
gcc/testsuite/gcc.c-torture/compile/pr55851.c
gcc/testsuite/gcc.c-torture/compile/vla-const-1.c
gcc/testsuite/gcc.c-torture/compile/vla-const-2.c
gcc/testsuite/gcc.c-torture/execute/20010209-1.c
gcc/testsuite/gcc.c-torture/execute/20020314-1.c
gcc/testsuite/gcc.c-torture/execute/20020412-1.c
gcc/testsuite/gcc.c-torture/execute/20021113-1.c
gcc/testsuite/gcc.c-torture/execute/20040223-1.c
gcc/testsuite/gcc.c-torture/execute/20040308-1.c
gcc/testsuite/gcc.c-torture/execute/20040811-1.c
gcc/testsuite/gcc.c-torture/execute/20070824-1.c
gcc/testsuite/gcc.c-torture/execute/20070919-1.c
gcc/testsuite/gcc.c-torture/execute/920721-2.c
gcc/testsuite/gcc.c-torture/execute/920929-1.c
gcc/testsuite/gcc.c-torture/execute/921017-1.c
gcc/testsuite/gcc.c-torture/execute/941202-1.c
gcc/testsuite/gcc.c-torture/execute/align-nest.c
gcc/testsuite/gcc.c-torture/execute/alloca-1.c
gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c
gcc/testsuite/gcc.c-torture/execute/pr22061-1.c
gcc/testsuite/gcc.c-torture/execute/pr22061-4.c
gcc/testsuite/gcc.c-torture/execute/pr36321.c
gcc/testsuite/gcc.c-torture/execute/pr43220.c
gcc/testsuite/gcc.c-torture/execute/vla-dealloc-1.c
gcc/testsuite/gcc.dg/20001012-2.c
gcc/testsuite/gcc.dg/auto-type-1.c
gcc/testsuite/gcc.dg/builtin-object-size-1.c
gcc/testsuite/gcc.dg/builtin-object-size-2.c
gcc/testsuite/gcc.dg/builtin-object-size-3.c
gcc/testsuite/gcc.dg/builtin-object-size-4.c
gcc/testsuite/gcc.dg/packed-vla.c
gcc/testsuite/gcc.dg/pr31507-1.c
gcc/testsuite/gcc.dg/torture/pr48953.c
gcc/testsuite/gcc.dg/torture/pr8081.c
gcc/testsuite/gcc.dg/torture/stackalign/alloca-1.c
gcc/testsuite/gcc.dg/torture/stackalign/global-1.c
gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c
gcc/testsuite/gcc.dg/torture/stackalign/inline-2.c
gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c
gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c
gcc/testsuite/gcc.dg/torture/stackalign/nested-3.c
gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c
gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c
gcc/testsuite/gcc.dg/torture/stackalign/pr16660-2.c
gcc/testsuite/gcc.dg/torture/stackalign/pr16660-3.c
gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c
gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c
gcc/testsuite/gcc.dg/torture/stackalign/vararg-1.c
gcc/testsuite/gcc.dg/torture/stackalign/vararg-2.c
gcc/testsuite/lib/target-supports.exp

index 4c96eb6f7a0bef8eedfd72f37811070a338e3955..16919877ba86867e1930a985980c7a1313233ddc 100644 (file)
@@ -1,3 +1,74 @@
+2014-11-10  Bernd Schmidt  <bernds@codesourcery.com>
+
+       * 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
index 9ed98868206265e3a2a2bbf49879edf07c4624fb..3244dc783008dbb9e60377860e0ee284e0d7cb83 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 const int a = 3;
 const int b = 50;
 
index 66ae7141147cc4be1e3fddb1446b11de1df031c0..1adb0f8d1c1f6278e948a6868ab732c3dfa45160 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 static void
 foo ()
 {
index c1cc81504e82affc292b9ccc25a4a38292ab58b2..605986a630d9f6e269624720da8615af098724ff 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 int x;
 
 static int
index 6832dc81e470fe14064e6a485e3f8d6fc88b02b7..11bc3af9fc6d2f7d26e123db2636abd1f88a6fea 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 void zzz (char *s1, char *s2, int len, int *q)
 {
   int z = 5;
index 45bd2a037be2aba75cb9b03e4e07b54aa3c1f18a..ba8dabaa3710f5b60edaf58ec001b2d7fde82e5d 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 __inline int f(int i)
 {
   struct {
index b9a36ef65a7b77e9fa82e63c994491f5ad107772..25e71bf5f6b01e29721e4c393c96a27fee346e50 100644 (file)
@@ -1,4 +1,5 @@
 /* PR tree-optimization/33680 */
+/* { dg-require-effective-target alloca } */
 
 int
 f (int dim, int *b, int *c)
index efcd51269ba4b8948354d64b650301941b305cd7..43bc0989645a4e8b84795d35ce5458d24341bac8 100644 (file)
@@ -1,4 +1,5 @@
 /* PR middle-end/34134 */
+/* { dg-require-effective-target alloca } */
 
 extern void bar (void *, int);
 
index f2bc40d72429fed66a4f7e2cd1fea0b75706c8e4..2bac5814a7b90a405fc82bf6b70819cf7bd8d88f 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 main ()
 {
   char *a;
index cc5e30c2a80165fcef54aade69b74b148d17d923..293c466dcbb225786e614a4bb0ecd98cf38df12b 100644 (file)
@@ -1 +1,2 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 x(a){struct{int p[a],i;}l;l.i;}
index 3911f87bc94457c794fc339fbb173a81bab577d5..14bf5790d0482e258edf281c9f299d6f734c0a2c 100644 (file)
@@ -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)
index 26c2c7017568f1ed135d4a9eb3691425da46309d..8205a9c14547dcbdd8cee4005e4d2b58ca6f4a0c 100644 (file)
@@ -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)
index b857472f65f278b8c76e3fef699185c05abf9451..6dde3c856be5cf7aae1687de70bcfdaf0558f588 100644 (file)
@@ -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 ();
index 53de05cdb403eb99bc3a2206de7e20209cafdde4..fc343da9dab7ad674c30d49cd85a2cb988ae14df 100644 (file)
@@ -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)
index b89ee6391bb7f9563209fa712a932cff6dbbd8f2..5917794cc3468aa3ac39057b376a4fdb01f4b84f 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-options "-fexceptions" } */
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 
 void
 af (void *a)
index f592d4be4d7e3f026f4508893690240f87085bda..ce03a8ff47e8bc3b898d351075757b352a27ed43 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 typedef const int cint;
 typedef struct {
 } Bounds;
index 5b2abb0d421259bbd6ca4e4a40360f7cf649f180..354f40eb8fc3354b1a5cf7faf639854ca9650702 100644 (file)
@@ -1,4 +1,5 @@
 /* PR target/51354 */
+/* { dg-require-effective-target alloca } */
 
 extern void abort (void);
 
index 03d49908912b2b72dfa92a2ced56ace38825ea7a..38a4ab57cef3449556d24581949ff2f117c33ba5 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 
 int __re_compile_fastmap(unsigned char *p)
 {
index 6198a7339cc510312ac3c1499883cb5b84ac1b73..8d118b87e3ac3c6ebbfa50c61a2ed9b272a94613 100644 (file)
@@ -1,4 +1,5 @@
 /* PR middle-end/55851 */
+/* { dg-require-effective-target alloca } */
 
 enum { A = 1UL, B = -1UL } var = A;
 void foo (char *);
index 6acc3d83050b685c54c37b6eb0edbff1607c31db..c7c1dbee5232897b27498700f01c8db72eb270a9 100644 (file)
@@ -1,5 +1,6 @@
 /* Test TREE_CONSTANT VLA size: bug 27893.  */
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-require-effective-target alloca } */
 int a;
 void g(void *);
 void f(void) { int b[(__SIZE_TYPE__)&a]; g(b); }
index 913a730b458fcaa57ed11bc4d865c3f8df60bcca..5bbd9b5ebdbadb6f24681eb87537bf165f33a2cf 100644 (file)
@@ -1,4 +1,5 @@
 /* Test TREE_CONSTANT VLA size: bug 27893.  */
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-require-effective-target alloca } */
 void g(void *);
 void f(void) { int b[1/0]; g(b); }
index e04d605ed63ef12d064b1e67d723d7931a896cfb..1df7332f209638bcca93af88a4839c8c842492c8 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 int b;
 int foo (void)
 {
index 28288c82c8bc7ee74e0969f1711ffcbdfae65228..2f68ae8ff6dbc6c1c8bf22b977285b2f5932b3d7 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 void f(void * a, double y)
 {
 }
index df0efe008ad2eb57d1e4b5170f4c9e0d944e3ae9..58205d23d5b364036275e85cd8135c995650b3a7 100644 (file)
@@ -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 <stdarg.h>
 
index 420926d7548b4e8cad4315993d60b9b2896cdc8f..8226d3a85662ba610b955dbc47a8539da9412f73 100644 (file)
@@ -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.  */
 
index 940ec0dcffaeec77e951ff15950194a6424b5e7b..c295e4b09eaeda683e53f9acff83f01c4b425212 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 #include <string.h>
 #include <stdio.h>
 
index 4c63535e7f7c79a8182675f6e14d85d657b63745..4277a5068bece78eb7ee495b9f18c535a0adaa23 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 /* This used to fail on SPARC with an unaligned memory access.  */
 
 void foo(int n)
index 0122825323a3d1d34a7cd0f20c1b848d9ce952d6..f7a4de93dbff8c112cfd1828596bbef4551160be 100644 (file)
@@ -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.  */
index 74eb58c05b961dbac4e1aff504a12110fb20d84f..4842bfe218c9c278c8687b83318261435e4a9162 100644 (file)
@@ -1,4 +1,5 @@
 /* PR tree-optimization/33136 */
+/* { dg-require-effective-target alloca } */
 
 extern void abort (void);
 
index ade3d7e8e112917b8d89d54db2ff08718dfe6751..d3e76932df13c6ad6d073fcfbe17d0f62b80d0c9 100644 (file)
@@ -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);
index ed4e0bf87009fea2ce100f57fc1b5f2999f4a134..cfad0e9bbff78303177b6833d91608c41420544a 100644 (file)
@@ -1,2 +1,3 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 f(){}
 main(){int n=2;double x[n];f();exit(0);}
index e43444e31d7982354d9f52eefc606d825083cc23..061617df753586d01bdbe1e0bbf3933ca8155029 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 /* REPRODUCED:RUN:SIGNAL MACHINE:sparc OPTIONS: */
 f(int n)
 {
index ab68fc084981a276e0d645322dd1b826391a56d5..c7fab5840b331344f9fc66bb0d5c422b02d16fae 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 f(n)
 {
   int a[n];
index 72d0b33e924a3be411f17dc3e5ddf349a0a078f6..b97ae0e34a736be0b7ac099605dd3e6513536fab 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 g (x, y)
 {
   if (x != 3)
index 2ff2952c70c6840677b16acaab9b92bb82758d8d..5298b09366d051316934652442da77a2d7b3e18c 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 
 void foo(int n)
 {
index a8d1384c6ecebb1029153a52a7df56741cbd4dde..6a65ddfe9145e327ba9757f9955b0457c0facd66 100644 (file)
@@ -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.  */
index 9da787884dd87c51857590145ea5f4f991bdd00b..4370c3d07ae03c4c347208bcc9a657d03856370b 100644 (file)
@@ -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);
index 65375fecbc68b7d4ff85e906f00693a36fa73ab3..ffd6ccc7b46b26231baa7cc4c025dddf721bfac3 100644 (file)
@@ -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; }
index 38ce3e8c50789594d1de1e3d72e9cbdb4f016a08..f7c89e631be32c094145a75802fee5bb8da0981e 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 void
 bar (int N)
 {
index 1edf8e415258c7cd19081e0546b4a61fd49d77db..4af993dc0fd9f61966a1b3fe466b1f80731c2ec8 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 extern void abort (void);
 
 extern __SIZE_TYPE__ strlen (const char *);
index 0d6ebfb273488309e05d381376a8bcb2bc6bf3c2..d61dfe8fa35d1870e6316e726c094af38c30d0ee 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target int32plus } */
+/* { dg-require-effective-target alloca } */
 
 void *volatile p;
 
index 9eb95c1b4e698f5067b63e45206677efd7f586e1..3b74b85a10e88aae86eb3a19a91f9a8f30611af8 100644 (file)
@@ -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
index 629ae1b3773900a2502e551ce53acf12be9c9e8d..e7a4fb8da7a1f517c0331d48b74f964959899363 100644 (file)
@@ -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);
index f47693abbf3b3fa4108d222d635f5dc97f1b1c4d..882bf2c13fba9b2f0c4615d4fbb907bbcf957d40 100644 (file)
@@ -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);
index 13ebeb15b2540e67f86c35ce2b99d960ece6b4a3..264ef75518995105bd302efd56457307c96cca51 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
 
 typedef __SIZE_TYPE__ size_t;
 extern void abort (void);
index 21aff5a958dfcfb2bee335d63bcef3023c8f8f3d..ad2dd296a9a0ad0382cc15fad279b7ac9f185531 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
 
 typedef __SIZE_TYPE__ size_t;
 extern void abort (void);
index 572ecda043615509c02221facb7b2d7d79634f3f..d5ca5047ee9e6c7ae16e572240659359b001de90 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
 
 typedef __SIZE_TYPE__ size_t;
 extern void abort (void);
index 1eb30d1ba536b820c84ad9b85b4dd6dff9c50c53..c22654dea2a2c97cdd47b8d7d140ebc2a1b7c15b 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
 
 typedef __SIZE_TYPE__ size_t;
 extern void abort (void);
index 04ccb96636dce064c17fea16a45b6d7285d109d8..e673b729b5463819169be4294b171526f51bfb92 100644 (file)
@@ -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 ();
index dbba1e1fcdb3bfe7ce1784b85cd838a20af9bf9f..f6a7e747dbf234d060d2db476c2a0cced048a8e4 100644 (file)
@@ -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);
 
index 41a3d7b80822a3e6f929bc9a12698799a88de82d..e5c8d6723b26b09d5cc6a8562141b1210652e4d8 100644 (file)
@@ -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)
 {
index 008ec5a14289137dfaf0e5405138623afc2bcc9e..0046655f0d3b174637ea87a3c1372041c46873cd 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 
 extern void abort (void);
 int
index e226e7f03717e7c78cd36f265951b4a9e4161731..6a35c9da8c3a533e2aec469ea99c835ac707aa92 100644 (file)
@@ -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"
 
index 332103a76334f816e4a7db7feed78f8f9c34f6d9..91983f5513b17cee00452917fd9a25b4507e8299 100644 (file)
@@ -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"
 
index 38127fd503a3a1cf5c93bc9d516a79086ce61bfa..9f3db0359e54b9d983fccb5cc5808b9d3f49aa2d 100644 (file)
@@ -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"
 
index 85a2ee3f3ccaf35c6fe2e07d59ca777f8783e7c6..f838435c758e6b2e2eaccbabe83614b9512e97eb 100644 (file)
@@ -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"
 
index 8402f95f594cff77eede1b267d0a8e6c8f744d5b..ea53330cb7a283fdbcfb072568a7e1c8a1106b8d 100644 (file)
@@ -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"
 
index dabc310d7527ee93e22a6b4328fcc9a7e98b90f9..ecfdcb017467d3503f0305885c6dbf98eb0d23af 100644 (file)
@@ -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"
 
index 917bdc37acb609bd9e82c7c1849c6f674f7fb3e0..631cc929e887a9a8d9a27472346553b65e4cedb3 100644 (file)
@@ -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"
 
index 05cb83301a3583a95e2e18c9d7d7d117367849a4..0e94d2cc52971d2e3dd1cbb6614bf1d0a2626ef4 100644 (file)
@@ -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"
 
index b917e824b628127f93434a5da39d0bda20d15057..0eef809be0185b67cf5e5786b2c7551a137d0ce6 100644 (file)
@@ -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"
 
index 9a039eb2bf50f33c8258fc45d9e45a0807ed5749..ee3dd74dc60254f81a0eb3e83b92b99f55c44e3c 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */
 
 #include "check.h"
 
index 1c1ddd1dd74c48e0ba84baf2a4bf0fddc1bc245c..dc5abf278c16ff7131432dff30ce03082c685a6b 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */
 
 #include "check.h"
 
index b218a14edf64e57bb3b2c40c04bc33176f85d5a9..bb1b4a1e6c9dde592af1b2e9fddd58c89111fdbe 100644 (file)
@@ -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"
 
index 8602132989410c033585f32441858fc18a227440..d0420ae23ce89833470169ec409d1f9234cb1a6e 100644 (file)
@@ -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"
 
index 5b36f2cd4ccfb1d15fc8db27be4f03d15a9e7cd8..22d4f77356ee9286b9bcb202b27bf389cded5b3b 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-require-effective-target alloca } */
 
 #include <stdarg.h>
 #include "check.h"
index 6740e994e2fbe99b4ad53314ad7b15adc118dade..c678b519495c05faca86c91d5dbbd4c9a10c96cd 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-require-effective-target alloca } */
 
 #include <stdarg.h>
 #include "check.h"
index 5e5338de16857401b9b112da5c1e4ae2afb99374..b6e2dded68207cfcb9037e8f18f4f36607d8f12f 100644 (file)
@@ -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 {} {