Work around bug of HP-UX 10.20 cc with -0.0 literal.
[gnulib.git] / tests / test-ceill.c
index 5701246..80ff75b 100644 (file)
     }                                                                       \
   while (0)
 
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0L.
+   So we use -zero instead.  */
+long double zero = 0.0L;
+
 int
 main ()
 {
@@ -47,7 +51,7 @@ main ()
 
   /* Zero.  */
   ASSERT (ceill (0.0L) == 0.0L);
-  ASSERT (ceill (-0.0L) == 0.0L);
+  ASSERT (ceill (-zero) == 0.0L);
   /* Positive numbers.  */
   ASSERT (ceill (0.3L) == 1.0L);
   ASSERT (ceill (0.7L) == 1.0L);