This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41062] [4.4/4.5 Regression] ICE in gfc_trans_use_stmts, at fortran/trans-decl.c:3438
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Aug 2009 07:48:38 -0000
- Subject: [Bug fortran/41062] [4.4/4.5 Regression] ICE in gfc_trans_use_stmts, at fortran/trans-decl.c:3438
- References: <bug-41062-15125@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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