------- Comment #5 from burnus at gcc dot gnu dot org 2009-08-14 07:48 ------- Even more reduced example.
In "two" the internal procedure "one" should be called. Additionally, there exists a generic procedure with the same name "one", which however is not available in "two" as it is _not_ host-associated due to the local definition of "one". The assert which fails is: gcc_assert (st && st->n.sym->attr.use_assoc); Thus one tries to do USE renames/"only" on the internal "one" rather than on the host-associated "one". But actually, in "two" in gfc_trans_use_stmts one should not touch "one" at all. module m1 interface one ! GENERIC "one" module procedure one1 end interface contains subroutine one1() end subroutine one1 end module m1 module m2 use m1, only: one ! USE generic "one" contains subroutine two() call one() ! Call internal "one" contains subroutine one() ! Internal "one" end subroutine one end subroutine two end module m2 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41062