diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2013-12-18 23:41:50 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2013-12-18 23:41:50 +0000 |
commit | 7b6b435332b4978cc4404727b2ff20eb893793ed (patch) | |
tree | 1e776afa6fac07f4b4fb0e27afd980654b8f3b63 /libgfortran | |
parent | 7289d1c97783c40ead8e74d6137e2dddc0d59e30 (diff) | |
download | gcc-7b6b435332b4978cc4404727b2ff20eb893793ed.tar.gz |
read.c (read_f): Convert assert to runtime error.
2013-12-18 Steven G. Kargl <kargl@gcc.gnu.org>
* io/read.c (read_f): Convert assert to runtime error.
2013-12-18 Steven G. Kargl <kargl@gcc.gnu.org>
* gfortran.dg/io_err_1.f90: New test.
From-SVN: r206102
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 4 | ||||
-rw-r--r-- | libgfortran/io/read.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 309712c012b..7bfb2c1242b 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,7 @@ +2013-12-18 Steven G. Kargl <kargl@gcc.gnu.org> + + * io/read.c (read_f): Convert assert to runtime error. + 2013-12-17 Andreas Tobler <andreast@gcc.gnu.org> * io/unix.c (tempfile_open): Only use the needed flag O_CLOEXEC. diff --git a/libgfortran/io/read.c b/libgfortran/io/read.c index e35b1a06168..f0de14c4651 100644 --- a/libgfortran/io/read.c +++ b/libgfortran/io/read.c @@ -1150,7 +1150,9 @@ done: exponent = - exponent; } - assert (exponent < 10000); + if (exponent >= 10000) + goto bad_float; + for (dig = 3; dig >= 0; --dig) { out[dig] = (char) ('0' + exponent % 10); |