diff options
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r-- | gcc/fortran/symbol.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 4463460..126a52b 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -1672,7 +1672,12 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus *where) if (type != BT_UNKNOWN && !(sym->attr.function && sym->attr.implicit_type)) { - gfc_error ("Symbol '%s' at %L already has basic type of %s", sym->name, + if (sym->attr.use_assoc) + gfc_error ("Symbol '%s' at %L conflicts with symbol from module '%s', " + "use-associated at %L", sym->name, where, sym->module, + &sym->declared_at); + else + gfc_error ("Symbol '%s' at %L already has basic type of %s", sym->name, where, gfc_basic_typename (type)); return FAILURE; } |