From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1729) id BD5BB3A3E416; Thu, 13 May 2021 16:13:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD5BB3A3E416 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Kwok Yeung To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/omp/gcc-11] Fix vector handling for firstprivate of <= pointer size X-Act-Checkin: gcc X-Git-Author: Tobias Burnus X-Git-Refname: refs/heads/devel/omp/gcc-11 X-Git-Oldrev: 88af24999b79d1307496f92f26480427778d0357 X-Git-Newrev: ee2bcf1934bf78a509ac32632118ab20fcc2d6aa Message-Id: <20210513161340.BD5BB3A3E416@sourceware.org> Date: Thu, 13 May 2021 16:13:40 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2021 16:13:40 -0000 https://gcc.gnu.org/g:ee2bcf1934bf78a509ac32632118ab20fcc2d6aa commit ee2bcf1934bf78a509ac32632118ab20fcc2d6aa Author: Tobias Burnus 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.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp index e2876b6aa34..b9fb82e39d8 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-20 Kwok Cheung Yeung * omp-general.c (oacc_verify_routine_clauses): Handle diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 1e509b36d62..9b1d5e3763d 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -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