From 853a4203b72296bc59f14ae6e8c467208e9679d2 Mon Sep 17 00:00:00 2001 From: Francois-Xavier Coudert Date: Fri, 17 Jun 2005 18:20:29 +0200 Subject: [PATCH] re PR libfortran/19155 ([4.0 only] blanks not treated as zeros in 'E' format read (NIST FM110.FOR)) 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 | 6 ++++++ libgfortran/io/read.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index e8033be..2e7a7a2 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2005-06-18 Francois-Xavier Coudert + + 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 PR libfortran/19216 diff --git a/libgfortran/io/read.c b/libgfortran/io/read.c index fbd38f1..556e0af 100644 --- a/libgfortran/io/read.c +++ b/libgfortran/io/read.c @@ -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"); -- 2.7.4