aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r--gcc/fortran/io.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index c5ceb06..ef51308 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -1643,7 +1643,14 @@ match_dt_element (io_kind k, gfc_dt * dt)
m = match_ltag (&tag_end, &dt->end);
if (m == MATCH_YES)
- dt->end_where = gfc_current_locus;
+ {
+ if (k == M_WRITE)
+ {
+ gfc_error ("END tag at %C not allowed in output statement");
+ return MATCH_ERROR;
+ }
+ dt->end_where = gfc_current_locus;
+ }
if (m != MATCH_NO)
return m;