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/44957] generic procedure name not included in symbol table



------- Comment #6 from kargl at gcc dot gnu dot org  2010-07-16 17:18 -------
(In reply to comment #3)
> I've investigated further, and can reproduce it, but with one more condition
> that I didn't mention in the original bugreport. 
> Basically, it happens when we have two modules, both defining a subroutine with
> the same name, where one happens to use the other (with a renaming).
> For example:
> 
> 
> The module m_dropdead defines an interface 'die'.
> The module m_die also defines an interface 'die'.
> 
> So far, so good, and both compile fine.
> However the subroutines in m_die use the die interface from m_dropdead:
>      use m_dropdead, only : ddie => die
> 
> Not a problem so far.
> 
> But then, when I attempt to compile other files that use m_die, the compiler
> gets confused. For example, when compiling m_IndexBin_char, we get to the line:
>    use m_die,   only : die
> and the compiler complains that m_die doesn't have a die routine. It looks like
> a compiler bug - somehow or other the remapping to ddie in m_die has messed up
> the symbol table beyond the scope of the subroutine it was used in.
> 
> I'm attaching three files that demonstrate the bug.  If you remove the line
> that's commented out in m_die, and run them through gfortran, you should see it
> trip up when compiling m_IndexBin_char

What command line?  With the renaming line uncommented, I see

troutmask:sgk[209] gfc43 -c m_dropdead.F90 m_die.F90 m_IndexBin_char.F90
troutmask:sgk[210] rm *.mod
troutmask:sgk[211] gfc44 -c m_dropdead.F90 m_die.F90 m_IndexBin_char.F90
troutmask:sgk[212] rm *.mod
troutmask:sgk[213] gfc45 -c m_dropdead.F90 m_die.F90 m_IndexBin_char.F90
troutmask:sgk[214] rm *.mod
troutmask:sgk[215] gfc4x -c m_dropdead.F90 m_die.F90 m_IndexBin_char.F90

> BTW I'm running gcc 4.3.0
> On Mac OS X 10.5.8.

Ah, here the potential problem, Mac OS X is notorious for having
problems that other OS's do not.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44957


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