https://gcc.gnu.org/g:9d43e819d88f97c7ade7f8c95c35ea3464ea7771

commit 9d43e819d88f97c7ade7f8c95c35ea3464ea7771
Author: Tobias Burnus <tob...@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.cc    | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp
index 68653888065..331a88af92d 100644
--- a/gcc/ChangeLog.omp
+++ b/gcc/ChangeLog.omp
@@ -1,3 +1,8 @@
+2020-02-06  Tobias Burnus  <tob...@codesourcery.com>
+
+       * omp-low.c (convert_from_firstprivate_int):
+       Use VIEW_CONVERT also for vectors.
+
 2023-04-17  Kwok Cheung Yeung  <k...@codesourcery.com>
 
        * gimplify.cc (omp_group_base): Handle GOMP_MAP_DECLARE_ALLOCATE
diff --git a/gcc/omp-low.cc b/gcc/omp-low.cc
index 0b35f2469a6..2db80e2498b 100644
--- a/gcc/omp-low.cc
+++ b/gcc/omp-low.cc
@@ -12851,7 +12851,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

Reply via email to