Commit f1cb5c0a by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/92084 (ICE: tree check: expected tree that contains 'decl minimal'…

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
parent 3c917358
2019-10-14 Jakub Jelinek <jakub@redhat.com> 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 * parser.c (cp_parser_omp_all_clauses): Change bool NESTED_P argument
into int NESTED, if it is 2, diagnose missing commas in between into int NESTED, if it is 2, diagnose missing commas in between
clauses. clauses.
......
...@@ -5068,7 +5068,9 @@ handle_omp_array_sections_1 (tree c, tree t, vec<tree> &types, ...@@ -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, saying how many times the side-effects are evaluated is unspecified,
makes int *a, *b; ... reduction(+:a[a = b, 3:10]) really unspecified. */ makes int *a, *b; ... reduction(+:a[a = b, 3:10]) really unspecified. */
warning_sentinel s (flag_strong_eval_order, 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); ret = grok_array_decl (OMP_CLAUSE_LOCATION (c), ret, low_bound, false);
return ret; return ret;
} }
......
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> 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
* gcc.dg/diag-aka-5.h: New test. * gcc.dg/diag-aka-5.h: New test.
......
// 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));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment