From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1534) id D9F9A385840C; Mon, 24 Oct 2022 09:01:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9F9A385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666602087; bh=78OATEezmoPRhhKP06YihibNSgpNJUJutwrzxbZDe2g=; h=From:To:Subject:Date:From; b=AXHU/SCsHYwwhvXU/uoKBlSFEsbQtUn6YQeD8G0EtwAuTltblJZJBJrQ9ouK0YtYQ seffPw/DbkL28x9w1w4pTiYIGQ84nPywIGu3HiUqQUH3pazquMWld0YxCTuMS1LDr8 9B1SIty3xk1OzMgp5yrJixip2kCApE45WmQd6iwk= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Tobias Burnus To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/omp/gcc-12] Missing pr104517.c change from: 'Add a restriction on allocate clause (OpenMP 5.0)' X-Act-Checkin: gcc X-Git-Author: Tobias Burnus X-Git-Refname: refs/heads/devel/omp/gcc-12 X-Git-Oldrev: 20477bb3ce743660a0be2c41ad56094fe1f802e0 X-Git-Newrev: e2d1088fa4694ef747efc651b7e318d67991f283 Message-Id: <20221024090127.D9F9A385840C@sourceware.org> Date: Mon, 24 Oct 2022 09:01:25 +0000 (GMT) List-Id: https://gcc.gnu.org/g:e2d1088fa4694ef747efc651b7e318d67991f283 commit e2d1088fa4694ef747efc651b7e318d67991f283 Author: Tobias Burnus Date: Mon Oct 24 10:53:36 2022 +0200 Missing pr104517.c change from: 'Add a restriction on allocate clause (OpenMP 5.0)' OG12 commit df47c25110474565f521508a1545232550052a75 included everything of r13-150-g1a8c4d9ed36556a95bd7d53c04d2ec4c95594061 but the change to gcc/testsuite/gcc.dg/gomp/pr104517.c This commit cherry-picks the missing changes to that file. Note: The OG12 commit already contained the ChangeLog.omp entry for that file. gcc/testsuite/ * gcc.dg/gomp/pr104517.c: Update. (cherry picked from commit 1a8c4d9ed36556a95bd7d53c04d2ec4c95594061) Diff: --- gcc/testsuite/gcc.dg/gomp/pr104517.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/gcc/testsuite/gcc.dg/gomp/pr104517.c b/gcc/testsuite/gcc.dg/gomp/pr104517.c index efb3175beb3..7e3bd1a1d1e 100644 --- a/gcc/testsuite/gcc.dg/gomp/pr104517.c +++ b/gcc/testsuite/gcc.dg/gomp/pr104517.c @@ -2,11 +2,13 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fcompare-debug -fopenmp -fno-tree-ter -save-temps" } */ -enum { - omp_default_mem_alloc, - omp_large_cap_mem_alloc, - omp_const_mem_alloc, - omp_high_bw_mem_alloc +typedef enum omp_allocator_handle_t +{ + omp_null_allocator = 0, + omp_default_mem_alloc = 1, + omp_large_cap_mem_alloc = 2, + omp_const_mem_alloc = 3, + omp_high_bw_mem_alloc = 4, } omp_allocator_handle_t; int t, bar_nte, bar_tl, bar_i3, bar_dd; @@ -23,7 +25,7 @@ bar (int *idp, int s, int nth, int g, int nta, int fi, int pp, int *q, int p = 0, i2 = 0, i1 = 0, m = 0, d = 0; #pragma omp target parallel for \ - device(p) firstprivate (f) allocate (f) in_reduction(+:r2) + device(p) firstprivate (f) allocate (omp_default_mem_alloc:f) in_reduction(+:r2) for (int i = 0; i < 4; i++) ll++; @@ -31,8 +33,8 @@ bar (int *idp, int s, int nth, int g, int nta, int fi, int pp, int *q, device(d) map (m) \ if (target: p) firstprivate (f) defaultmap(tofrom: scalar) is_device_ptr (idp) \ if (parallel: i2) reduction(+:r) num_threads (nth) linear (ll) \ - schedule(static) collapse(1) nowait depend(inout: d) allocate (f) \ - in_reduction(+:r2) + schedule(static) collapse(1) nowait depend(inout: d) \ + allocate (omp_default_mem_alloc:f) in_reduction(+:r2) for (int i = 0; i < 4; i++) ll++;