http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48972
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-05-12
06:15:57 UTC ---
For the diagnostic, the following untested patch should do. For Unicode
file-name support more work needs to be done ...
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -1478,6 +1478,13 @@ resolve_tag (const io_tag *tag, gfc_expr *e)
return FAILURE;
}
+ if (e->ts.type == BT_CHARACTER && e->ts.kind != gfc_default_character_kind)
+ {
+ gfc_error ("%s tag at %L must be a character string of default kind",
+ tag->name, &e->where);
+ return FAILURE;
+ }
+
if (e->rank != 0)
{
gfc_error ("%s tag at %L must be scalar", tag->name, &e->where);