2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66039
* io.c (match_filepos): Check for incomplete/mangled REWIND, FLUSH,
BACKSPACE, and ENDFILE statements
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66039
* gfortran.dg/filepos1.f90: New test
From-SVN: r223315
+2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/66039
+ * io.c (match_filepos): Check for incomplete/mangled REWIND, FLUSH,
+ BACKSPACE, and ENDFILE statements
+
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/64925
if (m == MATCH_NO)
{
m = gfc_match_expr (&fp->unit);
- if (m == MATCH_ERROR)
- goto done;
- if (m == MATCH_NO)
+ if (m == MATCH_ERROR || m == MATCH_NO)
goto syntax;
}
+2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/66039
+ * gfortran.dg/filepos1.f90: New test
+
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/64925
--- /dev/null
+! { dg-do compile }
+! PR fortran/66039
+!
+! Original code from Gerhard Steinmetz
+! <gerhard dot steinmetz dot fortran at t-online dot de>
+subroutine p1
+ rewind (( ! { dg-error "Syntax error in REWIND" }
+ rewind (- ! { dg-error "Syntax error in REWIND" }
+end subroutine p1
+
+subroutine p2
+ flush (( ! { dg-error "Syntax error in FLUSH" }
+ flush (- ! { dg-error "Syntax error in FLUSH" }
+end subroutine p2
+
+subroutine p4
+ backspace (( ! { dg-error "Syntax error in BACKSPACE" }
+ backspace (- ! { dg-error "Syntax error in BACKSPACE" }
+end subroutine p4
+
+subroutine p3
+ endfile (( ! { dg-error "Expecting END SUBROUTINE" }
+ endfile (- ! { dg-error "Expecting END SUBROUTINE" }
+end subroutine p3
+