aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io
diff options
context:
space:
mode:
authorSteven G. Kargl <kargl@gcc.gnu.org>2013-12-18 23:41:50 +0000
committerSteven G. Kargl <kargl@gcc.gnu.org>2013-12-18 23:41:50 +0000
commit7b6b435332b4978cc4404727b2ff20eb893793ed (patch)
tree1e776afa6fac07f4b4fb0e27afd980654b8f3b63 /libgfortran/io
parent7289d1c97783c40ead8e74d6137e2dddc0d59e30 (diff)
downloadgcc-7b6b435332b4978cc4404727b2ff20eb893793ed.zip
gcc-7b6b435332b4978cc4404727b2ff20eb893793ed.tar.gz
gcc-7b6b435332b4978cc4404727b2ff20eb893793ed.tar.bz2
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/io')
-rw-r--r--libgfortran/io/read.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libgfortran/io/read.c b/libgfortran/io/read.c
index e35b1a0..f0de14c 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);