blob: 1eac6b3fa96b45d4f8e882c29416e5fc6cd1610e [file] [log] [blame]
// { dg-run }
#pragma omp begin declare target indirect
class C
{
public:
int y;
int f (int x) { return x + y; }
};
#pragma omp end declare target
int main (void)
{
C c;
c.y = 27;
int x;
int (C::*fn_ptr) (int) = &C::f;
#pragma omp target map (to: c, fn_ptr) map (from: x)
x = (c.*fn_ptr) (42);
return x != 27 + 42;
}