2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / ieee / minuszero.c
blob85715261d6196955b37296febc85fcfbc132084c
1 main ()
3 union
5 double d;
6 unsigned short i[sizeof (double) / sizeof (short)];
7 } u;
8 int a = 0;
9 int b = -5;
10 int j;
12 u.d = (double) a / b;
14 /* Look for the right pattern, but be sloppy since
15 we don't know the byte order. */
16 for (j = 0; j < sizeof (double) / sizeof (short); j++)
18 if (u.i[j] == 0x8000)
19 exit (0);
21 abort ();