From: Jakub Jelinek Date: Mon, 14 Oct 2019 08:28:05 +0000 (+0200) Subject: re PR c++/92084 (ICE: tree check: expected tree that contains 'decl minimal' structur... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f1cb5c0aadc245d902e040f4b35a06e1fc8d2d50;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index af084974cf8..187935d5e7e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2019-10-14 Jakub Jelinek + 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 f93bb934850..59def3170ab 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 &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 7385c334505..093bd174d2b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-14 Jakub Jelinek + + PR c++/92084 + * g++.dg/gomp/pr92084.C: New test. + 2019-10-14 Richard Sandiford * 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 00000000000..da3079b3721 --- /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)); +}