2019-03-07 Jakub Jelinek <jakub@redhat.com>
+ PR translation/79999
+ * gimplify.c (gimplify_omp_ordered): Reword diagnostics to talk about
+ depend clause with source (or sink) modifier.
+ * omp-expand.c (expand_omp_ordered_sink): Likewise.
+
PR target/89602
* config/i386/sse.md (avx512f_mov<ssescalarmodelower>_mask,
*avx512f_load<mode>_mask, avx512f_store<mode>_mask): New define_insns.
if (!fail && i != gimplify_omp_ctxp->loop_iter_var.length () / 2)
{
error_at (OMP_CLAUSE_LOCATION (c),
- "number of variables in %<depend(sink)%> "
- "clause does not match number of "
+ "number of variables in %<depend%> clause with "
+ "%<sink%> modifier does not match number of "
"iteration variables");
failures++;
}
if (source_c)
{
error_at (OMP_CLAUSE_LOCATION (c),
- "more than one %<depend(source)%> clause on an "
- "%<ordered%> construct");
+ "more than one %<depend%> clause with %<source%> "
+ "modifier on an %<ordered%> construct");
failures++;
}
else
if (source_c && sink_c)
{
error_at (OMP_CLAUSE_LOCATION (source_c),
- "%<depend(source)%> clause specified together with "
- "%<depend(sink:)%> clauses on the same construct");
+ "%<depend%> clause with %<source%> modifier specified "
+ "together with %<depend%> clauses with %<sink%> modifier "
+ "on the same construct");
failures++;
}
forward = tree_int_cst_sgn (step) != -1;
}
if (forward ^ OMP_CLAUSE_DEPEND_SINK_NEGATIVE (deps))
- warning_at (loc, 0, "%<depend(sink)%> clause waiting for "
- "lexically later iteration");
+ warning_at (loc, 0, "%<depend%> clause with %<sink%> modifier "
+ "waiting for lexically later iteration");
break;
}
deps = TREE_CHAIN (deps);
build_int_cst (itype, 0));
if (integer_zerop (t) && !warned_step)
{
- warning_at (loc, 0, "%<depend(sink)%> refers to iteration never "
- "in the iteration space");
+ warning_at (loc, 0, "%<depend%> clause with %<sink%> modifier "
+ "refers to iteration never in the iteration "
+ "space");
warned_step = true;
}
cond = fold_build2_loc (loc, BIT_AND_EXPR, boolean_type_node,
2019-03-07 Jakub Jelinek <jakub@redhat.com>
+ PR translation/79999
+ * c-c++-common/gomp/doacross-1.c: Adjust expected diagnostics.
+ * c-c++-common/gomp/doacross-3.c: New test.
+
PR target/89602
* gcc.target/i386/avx512f-vmovss-1.c: New test.
* gcc.target/i386/avx512f-vmovss-2.c: New test.
for (i = 0; i < 64; i++)
{
#pragma omp ordered depend (sink: i - 1) depend (sink: i - 2)
- #pragma omp ordered depend (source) depend (source) /* { dg-error "more than one .depend.source.. clause on an" } */
+ #pragma omp ordered depend (source) depend (source) /* { dg-error "more than one .depend. clause with .source. modifier on an .ordered. construct" } */
}
#pragma omp for ordered (1)
for (i = 0; i < 64; i++)
{
- #pragma omp ordered depend (sink: i - 1) depend (source) depend (sink: i - 2) /* { dg-error "clause specified together with" } */
+ #pragma omp ordered depend (sink: i - 1) depend (source) depend (sink: i - 2) /* { dg-error ".depend. clause with .source. modifier specified together with .depend. clauses with .sink. modifier on the same construct" } */
}
}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+void
+foo (void)
+{
+ int i, j;
+ #pragma omp for ordered (1)
+ for (i = 0; i < 64; i++)
+ {
+ #pragma omp ordered depend (sink: i + 1) /* { dg-warning "'depend' clause with 'sink' modifier waiting for lexically later iteration" } */
+ #pragma omp ordered depend (source)
+ }
+ #pragma omp for ordered (1)
+ for (i = 63; i >= 0; i--)
+ {
+ #pragma omp ordered depend (sink: i - 1) /* { dg-warning "'depend' clause with 'sink' modifier waiting for lexically later iteration" } */
+ #pragma omp ordered depend (source)
+ }
+ #pragma omp for ordered (2) collapse (2)
+ for (i = 0; i < 64; i++)
+ for (j = 0; j < 64; j++)
+ {
+ #pragma omp ordered depend (sink: i + 1, j - 2) /* { dg-warning "'depend' clause with 'sink' modifier waiting for lexically later iteration" } */
+ #pragma omp ordered depend (source)
+ }
+ #pragma omp for ordered (2) collapse (2)
+ for (i = 63; i >= 0; --i)
+ for (j = 0; j < 64; j++)
+ {
+ #pragma omp ordered depend (sink: i - 2, j - 2) /* { dg-warning "'depend' clause with 'sink' modifier waiting for lexically later iteration" } */
+ #pragma omp ordered depend (source)
+ }
+ #pragma omp for ordered (2) collapse (2)
+ for (i = 0; i < 64; i++)
+ for (j = 0; j < 64; j++)
+ {
+ #pragma omp ordered depend (sink: i - 1, j + 2)
+ #pragma omp ordered depend (source)
+ }
+ #pragma omp for ordered (2) collapse (2)
+ for (i = 63; i >= 0; --i)
+ for (j = 0; j < 64; j++)
+ {
+ #pragma omp ordered depend (sink: i + 2, j + 2)
+ #pragma omp ordered depend (source)
+ }
+ #pragma omp for ordered (1)
+ for (i = 0; i < 64; i += 2)
+ {
+ #pragma omp ordered depend (sink: i - 1) /* { dg-warning "'depend' clause with 'sink' modifier refers to iteration never in the iteration space" } */
+ #pragma omp ordered depend (source)
+ }
+}