diff options
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/cp-array-notation.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cilk-plus/pr70565.C | 9 |
3 files changed, 19 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 201d736..1ea7b28 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 a0c54fd..36d6624 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 0000000..781ce2c --- /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; +} |