re PR fortran/34411 (hang-up during read of non-expected input)

2007-12-10  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	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.

From-SVN: r130767
This commit is contained in:
Jerry DeLisle 2007-12-11 03:49:52 +00:00
parent 36b46907d2
commit 5f026f90f0
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2007-12-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
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 <burnus@net-b.de>
PR fortran/34404

View File

@ -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 */