diff options
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r-- | gcc/fortran/io.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 48c15ef..7c48c49 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -2688,6 +2688,7 @@ static match match_dt_unit (io_kind k, gfc_dt *dt) { gfc_expr *e; + char c; if (gfc_match_char ('*') == MATCH_YES) { @@ -2695,6 +2696,11 @@ match_dt_unit (io_kind k, gfc_dt *dt) goto conflict; dt->io_unit = default_unit (k); + + c = gfc_peek_ascii_char (); + if (c == ')') + gfc_error_now ("Missing format with default unit at %C"); + return MATCH_YES; } |