avoid gcc 3.4.3 bug on long double NaN on Irix 6.5
[gnulib.git] / tests / test-isnanl.h
index 37e2857..baf04db 100644 (file)
@@ -21,6 +21,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "nan.h"
+
 #define ASSERT(expr) \
   do                                                                        \
     {                                                                       \
@@ -70,14 +72,14 @@ main ()
   ASSERT (!isnanl (1.0L / 0.0L));
   ASSERT (!isnanl (-1.0L / 0.0L));
   /* Quiet NaN.  */
-  ASSERT (isnanl (0.0L / 0.0L));
+  ASSERT (isnanl (NaNl ()));
 
 #if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT
   /* A bit pattern that is different from a Quiet NaN.  With a bit of luck,
      it's a Signalling NaN.  */
   {
     memory_long_double m;
-    m.value = 0.0L / 0.0L;
+    m.value = NaNl ();
 # if LDBL_EXPBIT0_BIT > 0
     m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1);
 # else