------- Comment #14 from pault at gcc dot gnu dot org  2008-01-02 21:00 -------
(In reply to comment #13)
> The patch in comment #12 works as advertised without regression in 32 and 64
> bit modes on ppc/Intel and my favourite platform.
> 
Thanks for the test.  I have been through several variants and think that this
is the most hygenic:

Index: gcc/fortran/module.c
===================================================================
*** gcc/fortran/module.c        (revision 131237)
--- gcc/fortran/module.c        (working copy)
*************** load_needed (pointer_info *p)
*** 3525,3530 ****
--- 3525,3536 ----
          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);

I'm going to regtest in a few minutes but I'm confident that it's OK.  It has
the advantage too that -fdump-parse-tree produces soemthing useful.

Paul


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34545

Reply via email to