public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tobias Burnus <burnus@gcc.gnu.org>
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)'
Date: Mon, 24 Oct 2022 09:01:25 +0000 (GMT)	[thread overview]
Message-ID: <20221024090127.D9F9A385840C@sourceware.org> (raw)

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++;

                 reply	other threads:[~2022-10-24  9:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221024090127.D9F9A385840C@sourceware.org \
    --to=burnus@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).