From: Andreas Tobler Date: Wed, 2 Oct 2019 19:05:35 +0000 (+0200) Subject: Testsuite, remove alloca header X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d61bff850d13ff103de3c2fb13d5e371996e1a3c;p=gcc.git Testsuite, remove alloca header 2019-10-02 Andreas Tobler * testsuite/libgomp.oacc-c-c++-common/loop-default.h: Remove alloca.h include. Replace alloca () with __builtin_alloca (). * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Likewise. Reviewed-by: Thomas Schwinge From-SVN: r276479 --- diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index dbb95e424de..3fe34c7c0b7 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,9 @@ +2019-10-02 Andreas Tobler + + * testsuite/libgomp.oacc-c-c++-common/loop-default.h: Remove alloca.h + include. Replace alloca () with __builtin_alloca (). + * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Likewise. + 2019-10-01 Jakub Jelinek * configure.ac: Remove GCC_HEADER_STDINT(gstdint.h). diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-default.h b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-default.h index a9e26939cf2..8c71249687c 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-default.h +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-default.h @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -28,9 +27,9 @@ check (const int *ary, int size, int gp, int wp, int vp) { int exit = 0; int ix; - int *gangs = (int *)alloca (gp * sizeof (int)); - int *workers = (int *)alloca (wp * sizeof (int)); - int *vectors = (int *)alloca (vp * sizeof (int)); + int *gangs = (int *)__builtin_alloca (gp * sizeof (int)); + int *workers = (int *)__builtin_alloca (wp * sizeof (int)); + int *vectors = (int *)__builtin_alloca (vp * sizeof (int)); int offloaded = 0; memset (gangs, 0, gp * sizeof (int)); diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c index dd8107c1acc..04387d36174 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c @@ -1,7 +1,6 @@ /* { dg-additional-options "-fopenacc-dim=16:16" } */ #include -#include #include #include #include @@ -28,9 +27,9 @@ int check (const int *ary, int size, int gp, int wp, int vp) { int exit = 0; int ix; - int *gangs = (int *)alloca (gp * sizeof (int)); - int *workers = (int *)alloca (wp * sizeof (int)); - int *vectors = (int *)alloca (vp * sizeof (int)); + int *gangs = (int *)__builtin_alloca (gp * sizeof (int)); + int *workers = (int *)__builtin_alloca (wp * sizeof (int)); + int *vectors = (int *)__builtin_alloca (vp * sizeof (int)); int offloaded = 0; memset (gangs, 0, gp * sizeof (int));