1 // RUN: %libomptarget-compile-generic -fopenmp-version=51
2 // RUN: %libomptarget-run-generic 2>&1 \
3 // RUN: | %fcheck-generic
5 extern "C" int printf(const char *, ...);
6 template <typename T
> class A
{
12 A(T x
, T y
) : X
{x
}, Y
{y
} {};
15 template <typename T
> class B
: public A
<T
> {
22 B(T x
, T y
) : A
<T
>(x
, y
), res
{0} {};
25 #pragma omp target map(res)
44 Y(int a
, int b
) : X(a
), B
{b
} {};
52 Z(int a
, int b
) : Y(a
, b
), res
{0} {};
54 #pragma omp target map(res)
65 class C
: public BASE
{
67 void bar(descriptor
&d
) {
71 #pragma omp target data map(from : d.C)
73 #pragma omp target teams firstprivate(Csize)
76 #pragma omp target map(from : d.A)
81 int main(int argc
, char *argv
[]) {
85 printf("b.res = %d \n", b
.res
);
89 printf("c.res = %d \n", c
.res
);