]> gcc.gnu.org Git - gcc.git/commitdiff
(immed_real_const_1): Check explicitly for NaNs.
authorRichard Stallman <rms@gnu.org>
Thu, 3 Jun 1993 22:53:46 +0000 (22:53 +0000)
committerRichard Stallman <rms@gnu.org>
Thu, 3 Jun 1993 22:53:46 +0000 (22:53 +0000)
From-SVN: r4626

gcc/varasm.c

index fea708389a3401834da99a5af89afd4d4b15b330..67954442233e556d50b70ea2726ed9b2b9627615 100644 (file)
@@ -1418,7 +1418,11 @@ immed_real_const_1 (d, mode)
   /* Avoid REAL_VALUES_EQUAL here in order to distinguish minus zero.  */
   if (!bcmp (&dconst0, &d, sizeof d))
     return CONST0_RTX (mode);
-  else if (REAL_VALUES_EQUAL (dconst1, d))
+  /* Check for NaN first, because some ports (specifically the i386) do not
+     emit correct ieee-fp code by default, and thus will generate a core
+     dump here if we pass a NaN to REAL_VALUES_EQUAL and if REAL_VALUES_EQUAL
+     does a floating point comparison.  */
+  else if (! REAL_VALUE_ISNAN (d) && REAL_VALUES_EQUAL (dconst1, d))
     return CONST1_RTX (mode);
 
   if (sizeof u == 2 * sizeof (HOST_WIDE_INT))
This page took 0.061821 seconds and 5 git commands to generate.