]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix vector handling for firstprivate of <= pointer size
authorTobias Burnus <tobias@codesourcery.com>
Fri, 6 Mar 2020 15:24:52 +0000 (16:24 +0100)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Thu, 22 Apr 2021 17:14:21 +0000 (10:14 -0700)
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.

gcc/ChangeLog.omp
gcc/omp-low.c

index e2876b6aa34f966b7bb159e0db764eb066c56815..b9fb82e39d84e1f8994a374bf0f4c95e32b7e351 100644 (file)
@@ -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
index 1e509b36d62e0110c0fab88b4d449a9dc641573d..9b1d5e3763d7455a0bfd6d02f0a47e047c173814 100644 (file)
@@ -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