re PR c++/70565 (ICE at gimplify.c:8832 (cilkplus array extension))
authorAldy Hernandez <aldyh@redhat.com>
Tue, 17 Jan 2017 16:54:55 +0000 (16:54 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Tue, 17 Jan 2017 16:54:55 +0000 (16:54 +0000)
PR c++/70565
* cp-array-notation.c (expand_array_notation_exprs): Handle
OMP_PARALLEL.

From-SVN: r244538

gcc/cp/ChangeLog
gcc/cp/cp-array-notation.c
gcc/testsuite/g++.dg/cilk-plus/pr70565.C [new file with mode: 0644]

index 201d73697e5309fe59a488bd9e5958493cfaeb0e..1ea7b28454f11ed0a69729600f46ca736e46a67c 100644 (file)
@@ -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
index a0c54fdd010272bed8305ceb9dd00dd0fe377236..36d66245224f5f953daf5a38b66df138ca667a7a 100644 (file)
@@ -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 (file)
index 0000000..781ce2c
--- /dev/null
@@ -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;
+}