summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/io.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 6072c0562f2..82d2fe3591a 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index 6766f3d8a23..dc20bc2ffb6 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -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)
OpenPOWER on IntegriCloud