blob: e0655536f7a0a1c32a918f4b112604a7e6b5e389 [file] [log] [blame]
// 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 ();
}