Commit 460b985e by Steven G. Kargl

re PR fortran/91587 (ICE in gfc_resolve_filepos, at fortran/io.c:2913)

2019-08-30  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/91587
	* io.c (match_filepos): MATCH_ERROR should branch to a syntax error.

2019-08-30  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/91587
	* gfortran.dg/pr91587.f90: New test.

From-SVN: r275236
parent a74e175a
2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91587
* io.c (match_filepos): MATCH_ERROR should branch to a syntax error.
2019-08-28 Steven G. Kargl <kargl@gcc.gnu.org> 2019-08-28 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91551 PR fortran/91551
......
...@@ -2845,7 +2845,7 @@ match_filepos (gfc_statement st, gfc_exec_op op) ...@@ -2845,7 +2845,7 @@ match_filepos (gfc_statement st, gfc_exec_op op)
m = match_file_element (fp); m = match_file_element (fp);
if (m == MATCH_ERROR) if (m == MATCH_ERROR)
goto done; goto syntax;
if (m == MATCH_NO) if (m == MATCH_NO)
{ {
m = gfc_match_expr (&fp->unit); m = gfc_match_expr (&fp->unit);
......
2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91587
* gfortran.dg/pr91587.f90: New test.
2019-08-30 Martin Sebor <msebor@redhat.com> 2019-08-30 Martin Sebor <msebor@redhat.com>
PR middle-end/91599 PR middle-end/91599
......
! { dg-do compile }
! PR fortran/91587
! Code contributed by Gerhard Steinmetz
program p
backspace(err=!) ! { dg-error "Syntax error in" }
flush(err=!) ! { dg-error "Syntax error in" }
rewind(err=!) ! { dg-error "Syntax error in" }
end
subroutine bar ! An other matcher runs, and gives a different error.
endfile(err=!) ! { dg-error "Expecting END" }
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment