]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use more appropriate var in localize_reductions call
authorJulian Brown <julian@codesourcery.com>
Fri, 6 Sep 2019 15:46:20 +0000 (08:46 -0700)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Wed, 21 Apr 2021 16:33:53 +0000 (09:33 -0700)
gcc/
* gimplify.c (gimplify_omp_for): Use for_stmt in call to
localize_reductions.

gcc/ChangeLog.omp
gcc/gimplify.c

index b0ad743f5f777dd2d6509d7f99203d992667efd3..ab17bf0863d49e7b37550b805a671610235b5257 100644 (file)
@@ -1,3 +1,8 @@
+2019-09-06  Julian Brown  <julian@codesourcery.com>
+
+       * gimplify.c (gimplify_omp_for): Use for_stmt in call to
+       localize_reductions.
+
 2019-09-06  Julian Brown  <julian@codesourcery.com>
 
        * config/nvptx/nvptx.c (omp-sese.h): Include.
index 05f88eae7e03bfb4027ca782503315f4afc7ec89..dcd6e0de34ca021f6898e0294b4bf5c5528f76a5 100644 (file)
@@ -11923,7 +11923,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