https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97898

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
diff --git a/gcc/omp-expand.cc b/gcc/omp-expand.cc
index 9864ce40219..d97b13b3a33 100644
--- a/gcc/omp-expand.cc
+++ b/gcc/omp-expand.cc
@@ -6245,7 +6245,8 @@ expand_omp_for_static_chunk (struct omp_region *region,
            t = fold_build_pointer_plus (vmain, step);
          else
            t = fold_build2 (PLUS_EXPR, type, vmain, step);
-         if (DECL_P (vback) && TREE_ADDRESSABLE (vback))
+         if (POINTER_TYPE_P (type)
+             || (DECL_P (vback) && TREE_ADDRESSABLE (vback)))
            t = force_gimple_operand_gsi (&gsi, t, true, NULL_TREE,
                                          true, GSI_SAME_STMT);
          assign_stmt = gimple_build_assign (vback, t);

Reply via email to