Debian Codegraph @

gcc/testsuite/g++.dg/modules/omp-2_a.C

raw
1 // { dg-additional-options "-fmodules-ts -fopenmp" }
2 // { dg-require-effective-target pthread }
3
4 export module foo;
5 // { dg-module-cmi foo { target pthread } }
6
7 // The OpenMPness doesn't escape to the interface.
8 export void frob (unsigned (&ary)[64])
9 {
10 int sum = 0;
11
12 #pragma omp for
13 for (unsigned ix = 0; ix < 64; ix++)
14 sum += ary[ix];
15
16 #pragma omp simd safelen(16) aligned (ary : 16)
17 for (unsigned ix = 0; ix < 64; ix++)
18 ary[ix] *= 2;
19 }