]> 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>
Tue, 9 Jun 2020 22:32:02 +0000 (15:32 -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 fc6d1b32dbacf3e5464b8f13c23d19505bdbdfb8..6fe69a818dfacdc748eb7fe32c252a2fc7cc895a 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 3faf7dc91986f5e1fb4a72cdbb4aba66ba17a664..096036353506e9dc58ee748e8e1b6c4167fa8c04 100644 (file)
@@ -11920,7 +11920,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