https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89574

--- Comment #8 from anlauf at gcc dot gnu.org ---
(In reply to anlauf from comment #7)
> Since changing "module init" to "module init1" avoid the issue in all
> cases, this lookslike a namespace / symbol issue.

I spent some time debugging this, and I am really confused now.

For reasons I do not understand, we end up in gfc_get_extern_function_decl,

2095          gsym = gfc_find_gsymbol (gfc_gsym_root, sym->name);

where we do not distinguish between the module that contains test_sub,
and the renamed-on-use subroutine from module mod.

Shouldn't we have entered mangled names in the tree that is pointed to by
gfc_gsym_root, instead of the unmangled ones?

Only if the name is of the bind-c type we have to use the "raw" name.

What am I missing?

Reply via email to