https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118321
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> --- The same problem exists for C++: D.3055 = __builtin_omp_get_mapped_ptr (a, D.3054); t::f (&s, D.3055, b, c); //------------- struct t { void f(int *x, int *y, int *z); #pragma omp declare variant(f) match(construct={dispatch}) adjust_args(need_device_ptr : y) void g(int *x, int *y, int *z); }; void test(int *a, int *b, int *c) { struct t s; #pragma omp dispatch s.g(a,b,c); }