/* { dg-do compile } */ /* { dg-additional-options "-fdump-tree-original" } */ /* Check that templates are properly handled. */ template T templ_var_fn(T x); #pragma omp declare variant(templ_var_fn) match(construct={dispatch}) adjust_args(need_device_ptr: x) template T templ_base_fn(T x); template void f(int *y, TB x) { #pragma omp dispatch nocontext (x) y = templ_base_fn (y); #pragma omp dispatch novariants (x) y = templ_base_fn (y); } void bar() { int a; bool b = true; f (&a, b); } /* { dg-final { scan-tree-dump-times "y = \.GOMP_DISPATCH \\(templ_base_fn \\(y\\)\\)" 2 "original" } } */