From db75c37a3a7aca7e7f4c634662d9cd9fab11518e Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Mon, 23 Jul 2007 02:42:05 +0000 Subject: [PATCH] read.c (convert_real): Generate error only on EINVAL. 2007-07-22 Jerry DeLisle * io/read.c (convert_real): Generate error only on EINVAL. From-SVN: r126834 --- libgfortran/ChangeLog | 7 +++++-- libgfortran/io/read.c | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 56c5fcdcdbe0..7cad67e89be4 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,7 @@ +2007-07-22 Jerry DeLisle + + * io/read.c (convert_real): Generate error only on EINVAL. + 2007-07-21 Christopher D. Rickett PR fortran/32627 @@ -108,13 +112,12 @@ Restore collateral damage from ISO C Binding merge. - 2007-06-29 Jerry DeLisle +2007-06-29 Jerry DeLisle PR libgfortran/32456 * io/unit.c (filename_from_unit): Don't use find_unit, instead search for unit directly. - 2007-07-02 Steven G. Kargl * Makefile.in: Regenerated with automake 1.9.6. diff --git a/libgfortran/io/read.c b/libgfortran/io/read.c index 57a58929d4a9..0f7d9a6dcfc6 100644 --- a/libgfortran/io/read.c +++ b/libgfortran/io/read.c @@ -177,10 +177,10 @@ convert_real (st_parameter_dt *dtp, void *dest, const char *buffer, int length) internal_error (&dtp->common, "Unsupported real kind during IO"); } - if (errno != 0 && errno != EINVAL) + if (errno == EINVAL) { generate_error (&dtp->common, ERROR_READ_VALUE, - "Range error during floating point read"); + "Error during floating point read"); return 1; }