aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c-c++-common/pr96390.c
blob: b89f934811a5fb0eb9363632a1f13ee8a5cbbf82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* { dg-additional-options "-O0 -fdump-tree-omplower" } */
/* { dg-additional-options "-foffload=-Wa,--verify" { target offload_target_nvptx } } */
/* { dg-require-alias "" } */
/* { dg-xfail-if "PR 97102/PR 97106 - .alias not (yet) supported for nvptx" { offload_target_nvptx } } */

#ifdef __cplusplus
extern "C" {
#endif

int foo () { return 42; }
int bar () __attribute__((alias ("foo")));
int baz () __attribute__((alias ("bar")));

#ifdef __cplusplus
}
#endif


int
main ()
{
  int n;
  #pragma omp target map(from:n)
    n = baz ();
  if (n != 42)
    __builtin_abort ();
}
/* { dg-final { scan-tree-dump-times "__attribute__..omp declare target" 1 "omplower" } } */