Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.c-torture / execute / ieee / mzero5.c
blob3804c08a80a7633768eeaccbef3282b0c6aa8c50
1 /* Test gcse handling of IEEE 0/-0 rules. */
2 static double zero = 0.0;
4 int
5 negzero_check (double d)
7 if (d == 0)
8 return !!memcmp ((void *)&zero, (void *)&d, sizeof (double));
9 return 0;
12 int
13 sub (double d, double e)
15 if (d == 0.0 && e == 0.0
16 && negzero_check (d) == 0 && negzero_check (e) == 0)
17 return 1;
18 else
19 return 0;
22 int
23 main (void)
25 double minus_zero = -0.0;
26 if (sub (minus_zero, 0))
27 abort ();
28 return 0;