Skip various cmp-mem-const tests on lp64 hppa*-*-*
[official-gcc.git] / libgomp / testsuite / libgomp.c-c++-common / target-same-name-1-b.c
blobce00876279713be10f5ebc2aef41f52842612485
1 /* { dg-skip-if "" { *-*-* } } */
2 /* Used by target-same-name-1.c */
4 static int local_link = 55;
5 #pragma omp declare target link(local_link)
7 extern int decl_a_link;
8 #pragma omp declare target link(decl_a_link)
10 #pragma omp declare target
11 static int __attribute__ ((noinline,noclone))
12 foo ()
14 return 7;
16 #pragma omp end declare target
18 static int __attribute__ ((noinline,noclone))
19 bar ()
21 int i;
22 #pragma omp target map(from:i)
23 i = foo ();
24 return i;
27 int
28 two () {
29 return bar ();
32 int
33 two_get_inc4_local_link ()
35 int res, res2;
36 #pragma omp target map(from: res, res2)
38 res = local_link;
39 local_link += 4;
40 res2 = local_link;
42 if (res + 4 != res2)
43 __builtin_abort ();
44 return res;
47 int
48 two_get_inc5_link_a ()
50 int res, res2;
51 #pragma omp target map(from: res, res2)
53 res = decl_a_link;
54 decl_a_link += 5;
55 res2 = decl_a_link;
57 if (res + 5 != res2)
58 __builtin_abort ();
59 return res;