This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/24685] real(10) formatted input is broken for huge values



------- Comment #1 from fxcoudert at gcc dot gnu dot org  2005-11-05 23:24 -------
> Looking at the difference, there also seems to be some problem with
> arithmetic..

No, it's only that the default format is not wide enough :)
Compared to other compilers, we could probably do something like:

Index: io/write.c
===================================================================
--- io/write.c  (revision 106521)
+++ io/write.c  (working copy)
@@ -1375,8 +1375,8 @@
       f.u.real.e = 3;
       break;
     case 10:
-      f.u.real.w = 24;
-      f.u.real.d = 15;
+      f.u.real.w = 40;
+      f.u.real.d = 31;
       f.u.real.e = 4;
       break;
     case 16:


And, accidentaly, the above patch fixes your testcase completely, although I
don't know why.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   GCC host triplet|i686-pc-linux-gnu           |
 GCC target triplet|                            |i686-pc-linux-gnu
   Last reconfirmed|0000-00-00 00:00:00         |2005-11-05 23:24:13
               date|                            |


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]