aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/920410-1.c
blob: 4bfa7a665a3af3c5eeaaa6acc4b1d8b4bbc022ef (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
29
30
int alloc_float(f)
 float f;
{  union
    {
      float f;
      int i;
    }
  u;
  u.f=f;
  return u.i&~1;
}

float c_float(int obj)
{  union
    {
      float f;
      int i;
    } u;

  u.i=obj;
  return u.f;
}

main()
{ int x=alloc_float(1.2);
  int y=alloc_float(5.7);
  int z=alloc_float(c_float(x)*c_float(y));

  printf("%g\n",(double)c_float(z));
}