2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66040
* parse.c(verify_st_order): Replace a gfc_internal_error with your
generic gfc_error.
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66040
* gfortran.dg/misplaced_statement.f90: New test.
From-SVN: r223318
+2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/66040
+ * parse.c(verify_st_order): Replace a gfc_internal_error with your
+ generic gfc_error.
+
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66039
break;
default:
- gfc_internal_error ("Unexpected %s statement in verify_st_order() at %C",
- gfc_ascii_statement (st));
+ return false;
}
/* All is well, record the statement in case we need it next time. */
+2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/66040
+ * gfortran.dg/misplaced_statement.f90: New test.
+
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66039
--- /dev/null
+!{ dg-do compile }
+! PR fortran/66040
+!
+! Original code from Gerhard Steinmetz
+! <gerhard dot steinmetz dot fortran at t-online dot de>
+real function f1(x)
+ sequence ! { dg-error "Unexpected SEQUENCE statement" }
+end function f1
+
+real function f2()
+ else ! { dg-error "Unexpected ELSE statement" }
+end function f2
+
+real function f3()
+ block data ! { dg-error "Unexpected BLOCK DATA statement" }
+end function f3
+
+real function f4()
+ program p ! { dg-error "Unexpected PROGRAM statement" }
+end function f4