Debian Codegraph @

gcc/testsuite/g++.dg/gomp/dispatch-1.C

raw
1 struct S {
2 int a;
3 void f0(double);
4 int operator()() { return a; }
5 bool operator!() { return !a; }
6 };
7
8 int f0(int);
9 template <typename T>
10 T f1(T a, T b);
11 void (*f2)(void);
12
13 namespace N {
14 class C{};
15 void f0(C);
16 int a;
17 }
18
19 int test() {
20 int result;
21 double d = 5.0;
22 N::C c;
23 S s;
24 S* sp = &s;
25 int &r = result;
26 #pragma omp dispatch
27 result = f0(5);
28 #pragma omp dispatch
29 r = f0(5);
30 #pragma omp dispatch
31 N::a = ::f0(5);
32 #pragma omp dispatch
33 sp->a = f1<int>(5, 10);
34 #pragma omp dispatch
35 s.a = f1(5, 10);
36 #pragma omp dispatch
37 f2();
38 #pragma omp dispatch
39 N::f0(c);
40 #pragma omp dispatch
41 f0(c);
42 #pragma omp dispatch
43 s.f0(d);
44 #pragma omp dispatch
45 sp->f0(d);
46 #pragma omp dispatch
47 sp->f0(d);
48 #pragma omp dispatch
49 s();
50 #pragma omp dispatch
51 !s;
52 return result;
53 }