https://gcc.gnu.org/g:e92c96a0efcf95847d43d9af47dcdd5be96dc0f4

commit e92c96a0efcf95847d43d9af47dcdd5be96dc0f4
Author: Paul-Antoine Arras <par...@baylibre.com>
Date:   Wed May 29 18:41:18 2024 +0200

    Accept duplicate map clauses on target construct
    
    Fixup for mainline commit 5fdb150cd4bf8f2da335e3f5c3a17aafcbc66dbe
    "OpenMP/OpenACC: Rework clause expansion and nested struct handling"

Diff:
---
 gcc/c/c-typeck.cc   | 2 +-
 gcc/cp/semantics.cc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/c/c-typeck.cc b/gcc/c/c-typeck.cc
index c728e69a748..68226c3c42b 100644
--- a/gcc/c/c-typeck.cc
+++ b/gcc/c/c-typeck.cc
@@ -16130,7 +16130,7 @@ c_finish_omp_clauses (tree clauses, enum 
c_omp_region_type ort)
              }
            else if (bitmap_bit_p (&map_head, DECL_UID (t))
                     && !bitmap_bit_p (&map_field_head, DECL_UID (t))
-                    && ort != C_ORT_OMP
+                    && ort != C_ORT_OMP && ort != C_ORT_OMP_TARGET
                     && ort != C_ORT_OMP_EXIT_DATA)
              {
                if (OMP_CLAUSE_CODE (c) != OMP_CLAUSE_MAP)
diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc
index f244008f7df..0985b060ed1 100644
--- a/gcc/cp/semantics.cc
+++ b/gcc/cp/semantics.cc
@@ -9066,7 +9066,7 @@ finish_omp_clauses (tree clauses, enum c_omp_region_type 
ort)
              bitmap_set_bit (&map_firstprivate_head, DECL_UID (t));
            else if (bitmap_bit_p (&map_head, DECL_UID (t))
                     && !bitmap_bit_p (&map_field_head, DECL_UID (t))
-                    && ort != C_ORT_OMP
+                    && ort != C_ORT_OMP && ort != C_ORT_OMP_TARGET
                     && ort != C_ORT_OMP_EXIT_DATA)
              {
                if (OMP_CLAUSE_CODE (c) != OMP_CLAUSE_MAP)

Reply via email to