pr60092.c: Remove default dg-skip-if arguments.
[gcc.git] / gcc / omp-low.c
index f99b2a62264e92c77a77e9ec1555f13f220e1b5f..7cc398ea5c099d975ac366de46fd6cde3021f0b5 100644 (file)
@@ -2929,6 +2929,7 @@ omp_max_vf (void)
 {
   if (!optimize
       || optimize_debug
+      || !flag_tree_loop_optimize
       || (!flag_tree_loop_vectorize
          && (global_options_set.x_flag_tree_loop_vectorize
               || global_options_set.x_flag_tree_vectorize)))
@@ -3671,7 +3672,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
       /* Don't add any barrier for #pragma omp simd or
         #pragma omp distribute.  */
       if (gimple_code (ctx->stmt) != GIMPLE_OMP_FOR
-         || gimple_omp_for_kind (ctx->stmt) & GF_OMP_FOR_KIND_FOR)
+         || gimple_omp_for_kind (ctx->stmt) == GF_OMP_FOR_KIND_FOR)
        gimple_seq_add_stmt (ilist, build_omp_barrier (NULL_TREE));
     }
 
@@ -6839,6 +6840,7 @@ expand_omp_simd (struct omp_region *region, struct omp_for_data *fd)
       if ((flag_tree_loop_vectorize
           || (!global_options_set.x_flag_tree_loop_vectorize
                && !global_options_set.x_flag_tree_vectorize))
+         && flag_tree_loop_optimize
          && loop->safelen > 1)
        {
          loop->force_vect = true;
@@ -9812,6 +9814,13 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
                                        TREE_VEC_ELT (t, 1)),
                                &initlist, true, NULL_TREE);
          gimple_seq_add_seq (&ilist, initlist);
+
+         tree clobber = build_constructor (TREE_TYPE (TREE_VEC_ELT (t, 1)),
+                                           NULL);
+         TREE_THIS_VOLATILE (clobber) = 1;
+         gimple_seq_add_stmt (&olist,
+                              gimple_build_assign (TREE_VEC_ELT (t, 1),
+                                                   clobber));
        }
 
       tree clobber = build_constructor (ctx->record_type, NULL);
@@ -10127,9 +10136,8 @@ lower_omp (gimple_seq *body, omp_context *ctx)
   gimple_stmt_iterator gsi;
   for (gsi = gsi_start (*body); !gsi_end_p (gsi); gsi_next (&gsi))
     lower_omp_1 (&gsi, ctx);
-  /* Inside target region we haven't called fold_stmt during gimplification,
-     because it can break code by adding decl references that weren't in the
-     source.  Call fold_stmt now.  */
+  /* During gimplification, we have not always invoked fold_stmt
+     (gimplify.c:maybe_fold_stmt); call it now.  */
   if (target_nesting_level)
     for (gsi = gsi_start (*body); !gsi_end_p (gsi); gsi_next (&gsi))
       fold_stmt (&gsi);
@@ -10269,7 +10277,8 @@ diagnose_sb_0 (gimple_stmt_iterator *gsi_p,
       if ((branch_ctx
           && gimple_code (branch_ctx) == GIMPLE_OMP_FOR
           && gimple_omp_for_kind (branch_ctx) == GF_OMP_FOR_KIND_CILKSIMD)
-         || (gimple_code (label_ctx) == GIMPLE_OMP_FOR
+         || (label_ctx
+             && gimple_code (label_ctx) == GIMPLE_OMP_FOR
              && gimple_omp_for_kind (label_ctx) == GF_OMP_FOR_KIND_CILKSIMD))
        cilkplus_block = true;
     }