From: Tobias Burnus Date: Fri, 6 Mar 2020 15:24:52 +0000 (+0100) Subject: Fix vector handling for firstprivate of <= pointer size X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4133ffad29c4cf9a862c4af10b17e86041e9d93;p=thirdparty%2Fgcc.git 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 --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp index 67ccc2c80c05..970a0e985827 100644 --- a/gcc/ChangeLog.omp +++ b/gcc/ChangeLog.omp @@ -1,3 +1,8 @@ +2020-02-06 Tobias Burnus + + * omp-low.c (convert_from_firstprivate_int): + Use VIEW_CONVERT also for vectors. + 2020-02-19 Julian Brown * gimplify.cc (gimplify_scan_omp_clauses): Handle diff --git a/gcc/omp-low.cc b/gcc/omp-low.cc index 3a7d5915f7b2..b28d2b81493a 100644 --- a/gcc/omp-low.cc +++ b/gcc/omp-low.cc @@ -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