| 1 |
/* { dg-additional-options "-O0 -fdump-tree-omplower" } */ |
| 2 |
/* { dg-additional-options "-foffload=-Wa,--verify" { target offload_target_nvptx } } */ |
| 3 |
/* { dg-require-alias "" } */ |
| 4 |
/* { dg-xfail-if PR105018 { offload_target_nvptx } } */ |
| 5 |
|
| 6 |
#ifdef __cplusplus |
| 7 |
extern "C" { |
| 8 |
#endif |
| 9 |
|
| 10 |
int foo () { return 42; } |
| 11 |
int bar () __attribute__((alias ("foo"))); |
| 12 |
int baz () __attribute__((alias ("bar"))); |
| 13 |
|
| 14 |
#ifdef __cplusplus |
| 15 |
} |
| 16 |
#endif |
| 17 |
|
| 18 |
|
| 19 |
int |
| 20 |
main () |
| 21 |
{ |
| 22 |
int n; |
| 23 |
#pragma omp target map(from:n) |
| 24 |
n = baz (); |
| 25 |
if (n != 42) |
| 26 |
__builtin_abort (); |
| 27 |
} |
| 28 |
/* { dg-final { scan-tree-dump-times "__attribute__..omp declare target" 1 "omplower" } } */ |