From 1ce521ece9a514dd8c5a3baa6e66bab928fd5e7c Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Fri, 16 Aug 2019 03:38:36 +0000 Subject: 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 --- gcc/testsuite/gcc.target/sparc/setjmp-1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/testsuite/gcc.target/sparc') 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 -#include #include #include #include @@ -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); -- cgit v1.1