From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1534) id EBEED3858020; Mon, 25 Oct 2021 18:48:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EBEED3858020 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Tobias Burnus To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-4691] libgomp.oacc-c-c++-common/loop-gwv-2.c: Use __builtin_alloca X-Act-Checkin: gcc X-Git-Author: Tobias Burnus X-Git-Refname: refs/heads/master X-Git-Oldrev: c49f389e3dee9f00ffc74de6a8770cd55dc12880 X-Git-Newrev: 72dc270be793f159a3a038bef41542d85550b331 Message-Id: <20211025184849.EBEED3858020@sourceware.org> Date: Mon, 25 Oct 2021 18:48:49 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Oct 2021 18:48:50 -0000 https://gcc.gnu.org/g:72dc270be793f159a3a038bef41542d85550b331 commit r12-4691-g72dc270be793f159a3a038bef41542d85550b331 Author: Tobias Burnus Date: Mon Oct 25 20:40:13 2021 +0200 libgomp.oacc-c-c++-common/loop-gwv-2.c: Use __builtin_alloca Some systems do not have but provide alloca differently, e.g. via stdlib.h. Do it like other testcases do and use __builtin_alloca. libgomp/ChangeLog: PR testsuite/102910 * testsuite/libgomp.oacc-c-c++-common/loop-gwv-2.c: Use __builtin_alloca instead of #include + alloca. Diff: --- libgomp/testsuite/libgomp.oacc-c-c++-common/loop-gwv-2.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-gwv-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-gwv-2.c index cb3878b8d4e..e73ed6064eb 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-gwv-2.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-gwv-2.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include @@ -78,9 +77,9 @@ int main () vectorsize = __builtin_goacc_parlevel_size (GOMP_DIM_VECTOR); } - gangdist = (int *) alloca (gangsize * sizeof (int)); - workerdist = (int *) alloca (workersize * sizeof (int)); - vectordist = (int *) alloca (vectorsize * sizeof (int)); + gangdist = (int *) __builtin_alloca (gangsize * sizeof (int)); + workerdist = (int *) __builtin_alloca (workersize * sizeof (int)); + vectordist = (int *) __builtin_alloca (vectorsize * sizeof (int)); memset (gangdist, 0, gangsize * sizeof (int)); memset (workerdist, 0, workersize * sizeof (int)); memset (vectordist, 0, vectorsize * sizeof (int));