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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index 425c2b8..cd21c6b 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -3328,6 +3328,14 @@ gfc_resolve_dt (gfc_dt *dt, locus *loc)
return false;
}
+ if (e->symtree && e->symtree->n.sym->attr.flavor == FL_PARAMETER
+ && e->ts.type == BT_CHARACTER)
+ {
+ gfc_error ("UNIT specification at %L must "
+ "not be a character PARAMETER", &e->where);
+ return false;
+ }
+
if (gfc_resolve_expr (e)
&& (e->ts.type != BT_INTEGER
&& (e->ts.type != BT_CHARACTER || e->expr_type != EXPR_VARIABLE)))