aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/BUG11.c
blob: 2d11c4be5fa8e2633610c17446076a828ba224c5 (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
31
/* { dg-additional-options "-std=gnu89" } */

#define DD 2410065408

unsigned
foo (d)
     double d;
{
  return d;
}

#if foobar

main ()
{
#if bar
  unsigned u = DD;
  double d = (double) u;
#else
  double d = (double) DD;
#endif
  printf ("%u = %u = %lf\n", foo ((double) DD), foo (d), d);
}
#else

main ()
{
  printf ("%lf\n", (double) ((unsigned) DD));
  foo ((double) DD);
}
#endif