From: jvdelisle Date: Tue, 11 Dec 2007 03:49:52 +0000 (+0000) Subject: 2007-12-10 Jerry DeLisle X-Git-Tag: upstream/4.9.2~44674 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=702a1c4e1339d54be5ed68e3ab04c051dc7d3d99;p=platform%2Fupstream%2Flinaro-gcc.git 2007-12-10 Jerry DeLisle PR libfortran/34411 * io/read.c (convert_real, read_l, read_decimal, read_radix, read_f): Call next_record after bad read or overflow error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130767 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index f80da8d..e23d362 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2007-12-10 Jerry DeLisle + + PR libfortran/34411 + * io/read.c (convert_real, read_l, read_decimal, read_radix, read_f): + Call next_record after bad read or overflow error. + 2007-12-09 Tobias Burnus PR fortran/34404 diff --git a/libgfortran/io/read.c b/libgfortran/io/read.c index 8baa357..b5f16ac 100644 --- a/libgfortran/io/read.c +++ b/libgfortran/io/read.c @@ -177,6 +177,7 @@ convert_real (st_parameter_dt *dtp, void *dest, const char *buffer, int length) { generate_error (&dtp->common, LIBERROR_READ_VALUE, "Error during floating point read"); + next_record (dtp, 1); return 1; } @@ -225,6 +226,7 @@ read_l (st_parameter_dt *dtp, const fnode *f, char *dest, int length) bad: generate_error (&dtp->common, LIBERROR_READ_VALUE, "Bad value on logical read"); + next_record (dtp, 1); break; } } @@ -395,11 +397,13 @@ read_decimal (st_parameter_dt *dtp, const fnode *f, char *dest, int length) bad: generate_error (&dtp->common, LIBERROR_READ_VALUE, "Bad value during integer read"); + next_record (dtp, 1); return; overflow: generate_error (&dtp->common, LIBERROR_READ_OVERFLOW, "Value overflowed during integer read"); + next_record (dtp, 1); return; } @@ -539,11 +543,13 @@ read_radix (st_parameter_dt *dtp, const fnode *f, char *dest, int length, bad: generate_error (&dtp->common, LIBERROR_READ_VALUE, "Bad value during integer read"); + next_record (dtp, 1); return; overflow: generate_error (&dtp->common, LIBERROR_READ_OVERFLOW, "Value overflowed during integer read"); + next_record (dtp, 1); return; } @@ -659,6 +665,7 @@ read_f (st_parameter_dt *dtp, const fnode *f, char *dest, int length) bad_float: generate_error (&dtp->common, LIBERROR_READ_VALUE, "Bad value during floating point read"); + next_record (dtp, 1); return; /* The value read is zero */