aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-10-14 10:28:05 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2019-10-14 10:28:05 +0200
commitf1cb5c0aadc245d902e040f4b35a06e1fc8d2d50 (patch)
treec6672e89bbcaf3522cf1430c7804ae0eed937ba8 /gcc
parent3c917358901af9a778d4ba851fa724f4923480bf (diff)
downloadgcc-f1cb5c0aadc245d902e040f4b35a06e1fc8d2d50.zip
gcc-f1cb5c0aadc245d902e040f4b35a06e1fc8d2d50.tar.gz
gcc-f1cb5c0aadc245d902e040f4b35a06e1fc8d2d50.tar.bz2
re PR c++/92084 (ICE: tree check: expected tree that contains 'decl minimal' structure, have 'compound_expr' in gimplify_scan_omp_clauses, at gimplify.c:9039)
PR c++/92084 * semantics.c (handle_omp_array_sections_1): Temporarily disable -fstrong-eval-order also for in_reduction and task_reduction clauses. * g++.dg/gomp/pr92084.C: New test. From-SVN: r276954
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/semantics.c4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr92084.C11
4 files changed, 23 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index af08497..187935d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2019-10-14 Jakub Jelinek <jakub@redhat.com>
+ PR c++/92084
+ * semantics.c (handle_omp_array_sections_1): Temporarily disable
+ -fstrong-eval-order also for in_reduction and task_reduction clauses.
+
* parser.c (cp_parser_omp_all_clauses): Change bool NESTED_P argument
into int NESTED, if it is 2, diagnose missing commas in between
clauses.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index f93bb93..59def31 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -5068,7 +5068,9 @@ handle_omp_array_sections_1 (tree c, tree t, vec<tree> &types,
saying how many times the side-effects are evaluated is unspecified,
makes int *a, *b; ... reduction(+:a[a = b, 3:10]) really unspecified. */
warning_sentinel s (flag_strong_eval_order,
- OMP_CLAUSE_CODE (c) == OMP_CLAUSE_REDUCTION);
+ OMP_CLAUSE_CODE (c) == OMP_CLAUSE_REDUCTION
+ || OMP_CLAUSE_CODE (c) == OMP_CLAUSE_IN_REDUCTION
+ || OMP_CLAUSE_CODE (c) == OMP_CLAUSE_TASK_REDUCTION);
ret = grok_array_decl (OMP_CLAUSE_LOCATION (c), ret, low_bound, false);
return ret;
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7385c33..093bd17 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-10-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/92084
+ * g++.dg/gomp/pr92084.C: New test.
+
2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
* gcc.dg/diag-aka-5.h: New test.
diff --git a/gcc/testsuite/g++.dg/gomp/pr92084.C b/gcc/testsuite/g++.dg/gomp/pr92084.C
new file mode 100644
index 0000000..da3079b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr92084.C
@@ -0,0 +1,11 @@
+// PR c++/92084
+
+void bar (int *, int);
+int baz (int);
+
+void
+foo (int *x, int y)
+{
+#pragma omp taskgroup task_reduction (*: x[baz (y)])
+ bar (x, baz (y));
+}