Commit 2b8f356c by Jerry DeLisle

re PR fortran/43832 (OPEN statement not diagnosing missing unit number)

2010-04-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/43832
	* io.c (gfc_match_open): Remove branch to syntax error. Add call to
	gfc_error with new error message.

From-SVN: r158684
parent 991b4da1
2010-04-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/43832
* io.c (gfc_match_open): Remove branch to syntax error. Add call to
gfc_error with new error message.
2010-04-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/43841
......
......@@ -1771,8 +1771,6 @@ gfc_match_open (void)
if (m == MATCH_NO)
{
m = gfc_match_expr (&open->unit);
if (m == MATCH_NO)
goto syntax;
if (m == MATCH_ERROR)
goto cleanup;
}
......@@ -1820,6 +1818,11 @@ gfc_match_open (void)
goto cleanup;
}
}
else if (!open->unit)
{
gfc_error ("OPEN statement at %C must have UNIT or NEWUNIT specified");
goto cleanup;
}
/* Checks on the ACCESS specifier. */
if (open->access && open->access->expr_type == EXPR_CONSTANT)
......
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