aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index f3c54b7..20528cb 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -3525,6 +3525,12 @@ load_needed (pointer_info *p)
associate_integer_pointer (q, ns);
}
+ /* Use the module sym as 'proc_name' so that gfc_get_symbol_decl
+ doesn't go pear-shaped if the symbol is used. */
+ if (!ns->proc_name)
+ gfc_find_symbol (p->u.rsym.module, gfc_current_ns,
+ 1, &ns->proc_name);
+
sym = gfc_new_symbol (p->u.rsym.true_name, ns);
sym->module = gfc_get_string (p->u.rsym.module);
strcpy (sym->binding_label, p->u.rsym.binding_label);