This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/41062] [4.4/4.5 Regression] ICE in gfc_trans_use_stmts, at fortran/trans-decl.c:3438



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]