aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/sparc
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2019-08-16 03:38:36 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2019-08-16 03:38:36 +0000
commit1ce521ece9a514dd8c5a3baa6e66bab928fd5e7c (patch)
tree4a05b24c504c973672c431befa31e0f486475622 /gcc/testsuite/gcc.target/sparc
parent2bfd0045b1a52540315042d0f55798c3679cd5f6 (diff)
downloadgcc-1ce521ece9a514dd8c5a3baa6e66bab928fd5e7c.zip
gcc-1ce521ece9a514dd8c5a3baa6e66bab928fd5e7c.tar.gz
gcc-1ce521ece9a514dd8c5a3baa6e66bab928fd5e7c.tar.bz2
use __builtin_alloca, drop non-standard alloca.h
Since alloca.h is not ISO C, most of our alloca-using tests seem to rely on __builtin_alloca instead of including the header and calling alloca. This patch extends this practice to some of the exceptions I found in gcc.target, marking them as requiring a functional alloca while at that. for gcc/testsuite/ChangeLog * gcc.target/arc/interrupt-6.c: Use __builtin_alloca, require effective target support for alloca, drop include of alloca.h. * gcc.target/i386/pr80969-3.c: Likewise. * gcc.target/sparc/setjmp-1.c: Likewise. * gcc.target/x86_64/abi/ms-sysv/gen.cc: Likewise. * gcc.target/x86_64/abi/ms-sysv/ms-sysv.c: Likewise. From-SVN: r274558
Diffstat (limited to 'gcc/testsuite/gcc.target/sparc')
-rw-r--r--gcc/testsuite/gcc.target/sparc/setjmp-1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.target/sparc/setjmp-1.c b/gcc/testsuite/gcc.target/sparc/setjmp-1.c
index d0fecb3..699d7f7 100644
--- a/gcc/testsuite/gcc.target/sparc/setjmp-1.c
+++ b/gcc/testsuite/gcc.target/sparc/setjmp-1.c
@@ -4,9 +4,9 @@
/* { dg-do run { target *-*-solaris2.* *-*-linux* *-*-*bsd* } } */
/* { dg-require-effective-target fpic } */
/* { dg-options "-fPIC" } */
+/* { dg-require-effective-target alloca } */
#include <stdio.h>
-#include <alloca.h>
#include <setjmp.h>
#include <string.h>
#include <stdlib.h>
@@ -26,7 +26,7 @@ int main (void)
{
setjmp (jb);
- char *p = alloca (256);
+ char *p = __builtin_alloca (256);
memset (p, 0, 256);
sprintf (p, "%d\n", foo);