public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-11] Fix vector handling for firstprivate of <= pointer size
@ 2021-05-13 16:13 Kwok Yeung
  0 siblings, 0 replies; only message in thread
From: Kwok Yeung @ 2021-05-13 16:13 UTC (permalink / raw)
  To: gcc-cvs

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

commit ee2bcf1934bf78a509ac32632118ab20fcc2d6aa
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Fri Mar 6 16:24:52 2020 +0100

    Fix vector handling for firstprivate of <= pointer size
    
    Test case is the existing libgomp.oacc-c++/firstprivate-mappings-1.C.
    
            * omp-low.c (convert_from_firstprivate_int):
            Use VIEW_CONVERT also for vectors.

Diff:
---
 gcc/ChangeLog.omp | 5 +++++
 gcc/omp-low.c     | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp
index e2876b6aa34..b9fb82e39d8 100644
--- a/gcc/ChangeLog.omp
+++ b/gcc/ChangeLog.omp
@@ -1,3 +1,8 @@
+2020-02-06  Tobias Burnus  <tobias@codesourcery.com>
+
+	* omp-low.c (convert_from_firstprivate_int):
+	Use VIEW_CONVERT also for vectors.
+
 2020-02-20  Kwok Cheung Yeung  <kcy@codesourcery.com>
 
 	* omp-general.c (oacc_verify_routine_clauses): Handle
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 1e509b36d62..9b1d5e3763d 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -12270,7 +12270,8 @@ convert_from_firstprivate_int (tree var, tree orig_type, bool is_ref,
     {
       tree_code code = NOP_EXPR;
 
-      if (TREE_CODE (type) == REAL_TYPE || TREE_CODE (type) == COMPLEX_TYPE)
+      if (TREE_CODE (type) == REAL_TYPE || TREE_CODE (type) == COMPLEX_TYPE
+	  || VECTOR_TYPE_P (type))
 	code = VIEW_CONVERT_EXPR;
 
       if (code == VIEW_CONVERT_EXPR


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

only message in thread, other threads:[~2021-05-13 16:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 16:13 [gcc/devel/omp/gcc-11] Fix vector handling for firstprivate of <= pointer size Kwok Yeung

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