public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-11] Revert "Fix regression of array members in OpenMP map clauses."
@ 2021-05-31  9:02 Chung-Lin Tang
  0 siblings, 0 replies; only message in thread
From: Chung-Lin Tang @ 2021-05-31  9:02 UTC (permalink / raw)
  To: gcc-cvs

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

commit de5cd4140c24292898bffd6145594f0b4170f28a
Author: Chung-Lin Tang <cltang@codesourcery.com>
Date:   Wed May 26 19:12:01 2021 +0800

    Revert "Fix regression of array members in OpenMP map clauses."
    
    This reverts commit 1d47d0c67e1fc2ee2ef6b85d6b0b659970552d57.

Diff:
---
 gcc/cp/semantics.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 6a71338fde9..cc049f5e8de 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -5576,8 +5576,6 @@ handle_omp_array_sections (tree c, enum c_omp_region_type ort)
 	    }
 	  OMP_CLAUSE_DECL (c) = first;
 	  OMP_CLAUSE_SIZE (c) = size;
-	  if (TREE_CODE (t) == FIELD_DECL)
-	    t = finish_non_static_data_member (t, NULL_TREE, NULL_TREE);
 	  if (OMP_CLAUSE_CODE (c) != OMP_CLAUSE_MAP
 	      || (TREE_CODE (t) == COMPONENT_REF
 		  && TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE))
@@ -5606,6 +5604,8 @@ handle_omp_array_sections (tree c, enum c_omp_region_type ort)
 	      }
 	  tree c2 = build_omp_clause (OMP_CLAUSE_LOCATION (c),
 				      OMP_CLAUSE_MAP);
+	  if (TREE_CODE (t) == FIELD_DECL)
+	    t = finish_non_static_data_member (t, NULL_TREE, NULL_TREE);
 	  if ((ort & C_ORT_OMP_DECLARE_SIMD) != C_ORT_OMP && ort != C_ORT_ACC)
 	    OMP_CLAUSE_SET_MAP_KIND (c2, GOMP_MAP_POINTER);
 	  else if (TREE_CODE (t) == COMPONENT_REF)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-31  9:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31  9:02 [gcc/devel/omp/gcc-11] Revert "Fix regression of array members in OpenMP map clauses." Chung-Lin Tang

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).