Debian Codegraph @

libgomp/testsuite/libgomp.oacc-c++/pr71959-aux.cc

raw
1 // { dg-do compile }
2
3 #define STR1(X) #X
4 #define STR2(X) STR1(X)
5 #define LABEL(X) STR2(__USER_LABEL_PREFIX__) X
6
7 struct Iter
8 {
9 int *cursor;
10
11 void ctor (int *cursor_) asm (LABEL ("_ZN4IterC1EPi"));
12 int *point () const asm (LABEL ("_ZNK4Iter5pointEv"));
13 };
14
15 #pragma acc routine
16 void Iter::ctor (int *cursor_)
17 {
18 cursor = cursor_;
19 }
20
21 #pragma acc routine
22 int *Iter::point () const
23 {
24 return cursor;
25 }
26
27 void apply (int (*fn)(), Iter out) asm (LABEL ("_ZN5Apply5applyEPFivE4Iter"));
28
29 #pragma acc routine
30 void apply (int (*fn)(), struct Iter out)
31 { *out.point() = fn (); }
32
33 extern "C" void __gxx_personality_v0 ()
34 {
35 }