[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.dg / goacc / routine-2.C
blobea7c9bf73939f44ef2d4bbf2f6d48d37121e8bff
1 /* Test invalid use of the routine directive.  */
3 template <typename T>
4 extern T one_d();
5 #pragma acc routine (one_d) /* { dg-error "names a set of overloads" } */
7 template <typename T>
9 one()
11   return 1;
13 #pragma acc routine (one) /* { dg-error "names a set of overloads" } */
15 int incr (int);
16 float incr (float);
18 #pragma acc routine (incr) /* { dg-error "names a set of overloads" } */
21 int sum (int, int);
23 namespace foo {
24 #pragma acc routine (sum)
25   int sub (int, int);
28 #pragma acc routine (foo::sub)
30 /* It's strange to apply a routine directive to subset of overloaded
31    functions, but that is permissible in OpenACC 2.x.  */
33 int decr (int a);
35 #pragma acc routine
36 float decr (float a);