]> 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, 21 Jun 2022 13:11:21 +0000 (14:11 +0100)
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.cc

index 67ccc2c80c0529a36a22984f7649e8da937786da..970a0e98582706b80719b1f373b3862f5af18507 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-19  Julian Brown  <julian@codesourcery.com>
 
        * gimplify.cc (gimplify_scan_omp_clauses): Handle
index 3a7d5915f7b22ee763c63accdc57a2dd86ff7d89..b28d2b81493a708406421746fdc87a3e82d41b33 100644 (file)
@@ -12915,7 +12915,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