From: Aldy Hernandez Date: Tue, 17 Jan 2017 16:54:55 +0000 (+0000) Subject: re PR c++/70565 (ICE at gimplify.c:8832 (cilkplus array extension)) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=893ffa2c8f842ffe11bed8c212207dc8c6a1638d;p=gcc.git re PR c++/70565 (ICE at gimplify.c:8832 (cilkplus array extension)) PR c++/70565 * cp-array-notation.c (expand_array_notation_exprs): Handle OMP_PARALLEL. From-SVN: r244538 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 201d73697e5..1ea7b28454f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2017-01-17 Aldy Hernandez + + PR c++/70565 + * cp-array-notation.c (expand_array_notation_exprs): Handle + OMP_PARALLEL. + 2017-01-11 Jason Merrill 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 a0c54fdd010..36d66245224 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 00000000000..781ce2c1649 --- /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; +}