aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.hsa.c/complex-align-2.c
blob: b2d7acff443ca34c80f1a53a52f6a5d91278aa8d (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
#pragma omp declare target
    _Complex int *g;
#pragma omp end declare target



_Complex float f(void);

int
main ()
{
  _Complex int y;
#pragma omp target map(from:y)
  {
    _Complex int x;
    g = &x;
    __imag__ x = 1;
    __real__ x = 2;
    y = x;
  }

  if ((__imag__ y != 1)
      || (__real__ y != 2))
    __builtin_abort ();
  return 0;
}