aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-general.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/omp-general.cc')
-rw-r--r--gcc/omp-general.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/omp-general.cc b/gcc/omp-general.cc
index 33792ad..0b4ec82 100644
--- a/gcc/omp-general.cc
+++ b/gcc/omp-general.cc
@@ -241,8 +241,13 @@ omp_extract_for_data (gomp_for *for_stmt, struct omp_for_data *fd,
break;
case OMP_CLAUSE_ORDERED:
fd->have_ordered = true;
- if (OMP_CLAUSE_ORDERED_EXPR (t))
- fd->ordered = tree_to_shwi (OMP_CLAUSE_ORDERED_EXPR (t));
+ if (OMP_CLAUSE_ORDERED_DOACROSS (t))
+ {
+ if (OMP_CLAUSE_ORDERED_EXPR (t))
+ fd->ordered = tree_to_shwi (OMP_CLAUSE_ORDERED_EXPR (t));
+ else
+ fd->ordered = -1;
+ }
break;
case OMP_CLAUSE_SCHEDULE:
gcc_assert (!distribute && !taskloop);
@@ -301,6 +306,9 @@ omp_extract_for_data (gomp_for *for_stmt, struct omp_for_data *fd,
break;
}
+ if (fd->ordered == -1)
+ fd->ordered = fd->collapse;
+
/* For order(reproducible:concurrent) schedule ({dynamic,guided,runtime})
we have either the option to expensively remember at runtime how we've
distributed work from first loop and reuse that in following loops with