PR c++/84556
* g++.dg/gomp/pr84556.C: New test.
* g++.dg/vect/pr84556.cc: New test.
From-SVN: r257986
+2018-02-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84556
+ * g++.dg/gomp/pr84556.C: New test.
+ * g++.dg/vect/pr84556.cc: New test.
+
2018-02-26 Dominique d'Humieres <dominiq@gcc.gnu.org>
PR fortran/32957
--- /dev/null
+// PR c++/84556
+// { dg-do compile }
+// { dg-options "-std=c++17 -fopenmp-simd" }
+
+void
+foo ()
+{
+ auto x = [] ()
+ {
+ #pragma omp simd
+ for (int i = 0; i < 8; ++i)
+ ;
+ };
+}
--- /dev/null
+// PR c++/84556
+// { dg-do run { target c++11 } }
+// { dg-options "-O2 -fopenmp-simd" }
+// { dg-additional-options "-mavx" { target avx_runtime } }
+
+int
+main ()
+{
+ int y[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };
+ auto x = [&y] ()
+ {
+ #pragma omp simd
+ for (int i = 0; i < 8; ++i)
+ y[i]++;
+ };
+ x ();
+ x ();
+ for (int i = 0; i < 8; ++i)
+ if (y[i] != i + 3)
+ __builtin_abort ();
+}