1 // { dg-do compile }
2 // { dg-require-effective-target c++11 }
3 // { dg-additional-options "-g" }
4 
main()5 int main()
6 {
7   int n = 0;
8 #pragma omp parallel
9 #pragma omp master
10 #pragma omp task shared (n)
11   for (int i = [](){ return 3; }(); i < 10; ++i)
12     n = i;
13 #pragma omp taskwait
14   if (n != 7)
15     __builtin_abort ();
16 }
17