comparison gcc/testsuite/g++.dg/gomp/pr78363-5.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 // { dg-do compile }
2 // { dg-require-effective-target c++11 }
3 // { dg-additional-options "-g" }
4
5 int main()
6 {
7 int n = 0;
8 #pragma omp task shared(n)
9 #pragma omp target map(tofrom:n)
10 #pragma omp for reduction (+: n)
11 for (int i = [](){ return 3; }(); i < 10; ++i)
12 n++;
13 if (n != 7)
14 __builtin_abort ();
15 #pragma omp taskwait
16 return 0;
17 }