http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47293

--- Comment #3 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2011-01-26 
05:45:35 UTC ---
I think this fixes it.  Why it was whacked, who knows.

Index: gd_qnan.h
===================================================================
--- gd_qnan.h    (revision 169141)
+++ gd_qnan.h    (working copy)
@@ -2,9 +2,9 @@
 #define d_QNAN0 0x0
 #define d_QNAN1 0xfff80000
 #define ld_QNAN0 0x0
-#define ld_QNAN1 0xc0000000
-#define ld_QNAN2 0xffff
-#define ld_QNAN3 0x0
+#define ld_QNAN1 0x0
+#define ld_QNAN2 0x0
+#define ld_QNAN3 0xffff8000
 #define ldus_QNAN0 0x0
 #define ldus_QNAN1 0x0
 #define ldus_QNAN2 0x0


Test program I used. Try this without the patch and it is very obvious what is
wrong.

character(len=200) :: str
real(16) :: r, x, y, z
integer(16) :: k
x = 0.0
y = 0.0
r = 1.0
str = 'NAN' ; read(str,*) r
print *, r
z = x/y
print *, z
k = transfer(z,k)
print "(b128)", k
print *
k = transfer(r,k)
print "(b128)", k
end

Reply via email to