public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-12] Missing pr104517.c change from: 'Add a restriction on allocate clause (OpenMP 5.0)'
@ 2022-10-24 9:01 Tobias Burnus
0 siblings, 0 replies; only message in thread
From: Tobias Burnus @ 2022-10-24 9:01 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:e2d1088fa4694ef747efc651b7e318d67991f283
commit e2d1088fa4694ef747efc651b7e318d67991f283
Author: Tobias Burnus <tobias@codesourcery.com>
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++;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-24 9:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24 9:01 [gcc/devel/omp/gcc-12] Missing pr104517.c change from: 'Add a restriction on allocate clause (OpenMP 5.0)' Tobias Burnus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).