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
+2013-12-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ * gfortran.dg/io_err_1.f90: New test.
+
2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-c++-common/cilk-plus/SE/ef_test.c: New test.
--- /dev/null
+! { dg-do run }
+! { dg-shouldfail "Compile-time specifier checking" }
+!
+! Contributed by Dominique Dhumieres <dominiq at lps dot ens dot fr>
+program read
+ character(50) :: buf='0.D99999'
+ double precision val
+ read (UNIT=buf, FMT='(D60.0)', ERR=10) Val
+ call abort
+10 read (UNIT=buf, FMT='(D60.0)') Val
+end program read
+! { dg-output "At line 10 of file.*" }
+! { dg-output "Fortran runtime error: Bad value during floating point read" }
+
+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.
exponent = - exponent;
}
- assert (exponent < 10000);
+ if (exponent >= 10000)
+ goto bad_float;
+
for (dig = 3; dig >= 0; --dig)
{
out[dig] = (char) ('0' + exponent % 10);