diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 201d73697e5309fe59a488bd9e5958493cfaeb0e..1ea7b28454f11ed0a69729600f46ca736e46a67c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2017-01-17 Aldy Hernandez <aldyh@redhat.com> + + PR c++/70565 + * cp-array-notation.c (expand_array_notation_exprs): Handle + OMP_PARALLEL. + 2017-01-11 Jason Merrill <jason@redhat.com> PR c++/78337 - ICE on invalid with generic lambda diff --git a/gcc/cp/cp-array-notation.c b/gcc/cp/cp-array-notation.c index a0c54fdd010272bed8305ceb9dd00dd0fe377236..36d66245224f5f953daf5a38b66df138ca667a7a 100644 --- a/gcc/cp/cp-array-notation.c +++ b/gcc/cp/cp-array-notation.c @@ -1198,6 +1198,10 @@ expand_array_notation_exprs (tree t) } case OMP_PARALLEL: + OMP_PARALLEL_BODY (t) + = expand_array_notation_exprs (OMP_PARALLEL_BODY (t)); + return t; + case OMP_TASK: case OMP_FOR: case OMP_SINGLE: diff --git a/gcc/testsuite/g++.dg/cilk-plus/pr70565.C b/gcc/testsuite/g++.dg/cilk-plus/pr70565.C new file mode 100644 index 0000000000000000000000000000000000000000..781ce2c16491f1b550fa43f5edeb80f1b07cdab1 --- /dev/null +++ b/gcc/testsuite/g++.dg/cilk-plus/pr70565.C @@ -0,0 +1,9 @@ +// { dg-do compile } */ +// { dg-options "-fcilkplus" } + +int array[999]; +void foo() +{ + _Cilk_for (int i=0; i < 999; ++i) + array[:] = 0; +}