diff options
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r-- | gcc/fortran/io.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index ee52c69..048f6f8 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -2046,7 +2046,7 @@ match_io (io_kind k) gfc_code *io_code; gfc_symbol *sym; gfc_expr *expr; - int comma_flag; + int comma_flag, c; locus where; gfc_dt *dt; match m; @@ -2059,6 +2059,16 @@ match_io (io_kind k) if (k == M_WRITE) goto syntax; + if (gfc_current_form == FORM_FREE) + { + c = gfc_peek_char(); + if (c != ' ' && c != '*' && c != '\'' && c != '"') + { + m = MATCH_NO; + goto cleanup; + } + } + m = match_dt_format (dt); if (m == MATCH_ERROR) goto cleanup; |