blob: bd84b492feec2b4e14447b872ff1657117a0218a [file] [log] [blame]
// { dg-do 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;
}