re PR libfortran/19155 ([4.0 only] blanks not treated as zeros in 'E' format read...
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>
Fri, 17 Jun 2005 16:20:29 +0000 (18:20 +0200)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Fri, 17 Jun 2005 16:20:29 +0000 (16:20 +0000)
PR libfortran/19155
* io/read.c (convert_real): strtod can set errno to EINVAL on an
empty string, but we shouldn't have an error in that case.

From-SVN: r101128

libgfortran/ChangeLog
libgfortran/io/read.c

index e8033bee477515dd68ae920311dfd52af7a9b606..2e7a7a264ce2ccbd8aa51b1193b25df2ab884278 100644 (file)
@@ -1,3 +1,9 @@
+2005-06-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
+
+       PR libfortran/19155
+       * io/read.c (convert_real): strtod can set errno to EINVAL on an
+       empty string, but we shouldn't have an error in that case.
+
 2005-06-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
 
        PR libfortran/19216
index fbd38f13becd3624722283d8df5e8fdd9e7a012d..556e0af38b31a5964ccf0be96cf782f69428a55d 100644 (file)
@@ -122,7 +122,7 @@ convert_real (void *dest, const char *buffer, int length)
       internal_error ("Unsupported real kind during IO");
     }
 
-  if (errno != 0)
+  if (errno != 0 && errno != EINVAL)
     {
       generate_error (ERROR_READ_VALUE,
                      "Range error during floating point read");