------- Comment #2 from fxcoudert at gcc dot gnu dot org 2006-02-05 22:19 ------- OK, now I understand: huge(0._10) is 1.1897314953572317650E+4932. But when you write it with a format not long enough, you may (as was the case) write it as 1.189731495357232E+4932, which is larger than huge(0._10). So indeed, when you read it back, it's out of the range accepted for real(10) variables. Changing the default format for these variables will indeed get rid of all this.
I will commit the trivial patch: Index: libgfortran/io/write.c =================================================================== --- libgfortran/io/write.c (revision 110617) +++ libgfortran/io/write.c (working copy) @@ -1373,8 +1373,8 @@ f.u.real.e = 3; break; case 10: - f.u.real.w = 24; - f.u.real.d = 15; + f.u.real.w = 28; + f.u.real.d = 19; f.u.real.e = 4; break; case 16: on trunk after regtesting. -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2005-11-05 23:24:13 |2006-02-05 22:19:58 date| | Summary|real(10) formatted input is |[4.1 only] real(10) |broken for huge values |formatted input is broken | |for huge values http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24685