summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr42196-1.c
blob: 96936c5e5889743643e6a72894406bfaac310b37 (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
union U
{
  double d;
  __complex__ int c;
};

double gd;
extern double bar (union U);

double foo (int b, double d, int c1, int c2)
{
  union U u;
  double r;

  if (b)
    {
      u.d = d;
      r = u.d;
    }
  else
    {
      __real__ u.c = c1;
      __imag__ u.c = c2;
      r = bar (u);
    }

  return r;
}