------- Comment #7 from pault at gcc dot gnu dot org 2006-08-19 12:32 ------- Yes, the problem is as I thought; rename the dummy and the external procedure, say to str1, and the module compiles fine. It also compiles if the order of the subroutines is changed. These are symptomatic of the symbol for str() being made available to sub_module by host association and then having the external attribute added to it.
This is confirmed by comparing the parse trees for the two different orders for the subroutines. In the case that fails, we have procedure name = sub_module symtree: str Ambig 0 from namespace test_module symtree: sub_module Ambig 0 from namespace test_module whilst the one that succeeds has symtree: sub_module Ambig 0 from namespace test_module symtree: str Ambig 0 symbol str (UNKNOWN 0)(PROCEDURE UNKNOWN-INTENT UNKNOWN-ACCESS UNKNOWN-PROC EXTERNAL DUMMY) I am not sure where this screw up occurs but am looking very closely at decl.c(attr_decl1). Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24866