From: Julian Brown Date: Fri, 6 Sep 2019 15:46:20 +0000 (-0700) Subject: [og9] Use more appropriate var in localize_reductions call X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f14dd44b3996135962e83eaab9a3aa1f7fe5618;p=thirdparty%2Fgcc.git [og9] Use more appropriate var in localize_reductions call gcc/ * gimplify.c (gimplify_omp_for): Use for_stmt in call to localize_reductions. (cherry picked from openacc-gcc-9-branch commit fda67bec41cbd463c1a4b048e3427fd8084dac30) --- diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp index ffe19bc58097..02667a2aed4b 100644 --- a/gcc/ChangeLog.omp +++ b/gcc/ChangeLog.omp @@ -1,3 +1,8 @@ +2019-09-06 Julian Brown + + * gimplify.c (gimplify_omp_for): Use for_stmt in call to + localize_reductions. + 2019-09-06 Julian Brown * config/nvptx/nvptx.c (omp-sese.h): Include. diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 3d869447d702..60761504a5e9 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -11082,7 +11082,8 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p) here, because the code to remove reductions in kernels regions cannot handle that. */ if (outer && outer->region_type == ORT_ACC_PARALLEL) - localize_reductions (OMP_FOR_CLAUSES (*expr_p), OMP_FOR_BODY (*expr_p)); + localize_reductions (OMP_FOR_CLAUSES (for_stmt), + OMP_FOR_BODY (for_stmt)); } /* Set OMP_CLAUSE_LINEAR_NO_COPYIN flag on explicit linear