Debian Codegraph @

gcc/testsuite/g++.dg/gomp/append-args-4.C

raw
1 /* Check the error when 'omp_interop_t' is not defined and the variant function
2 is found via Argument-dependent lookup; in that case, 'g' is not yet resolved
3 to a decl but is an indentifier node. Hence, the location is suboptimal, but
4 we get at least an error. */
5
6 namespace N {
7 class C{
8 public:
9 };
10 void g(C *c);
11 }
12
13 #pragma omp declare variant (g) match (construct={dispatch}) adjust_args (need_device_ptr: c) append_args (interop(target))
14 void f3(N::C *c);
15
16 /* { dg-error "30: argument 2 of 'g' must be of 'omp_interop_t'" "" { target *-*-* } .-3 } */
17 /* { dg-note "108: 'append_args' specified here" "" { target *-*-* } .-4 } */