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/38594] [4.4 Regression] module function name mangled improperly if contained function of same name exists



------- Comment #4 from tkoenig at gcc dot gnu dot org  2008-12-26 09:10 -------
(In reply to comment #3)
> > Works with 4.3:
> 
> Well, not really. gfortran 4.1/4.2/4.3 only call the module procedure, but for
> "call f()" the contained procedure should be called, which does not work with
> 4.[1-3].

The original test case does work, although it is likely that any real-world
program would fail :-)

Here's another test case making the problem maybe a bit clearer:

$ cat m2.f90
MODULE m
CONTAINS
  SUBROUTINE g(a)
  END SUBROUTINE

  SUBROUTINE f()
    CALL g(i)
  CONTAINS
    SUBROUTINE g(i)
    END SUBROUTINE
  END SUBROUTINE
END MODULE

  USE m
  CALL g(a)
END
$ gfortran m2.f90
m2.f90:15.9:

  CALL g(a)
         1
Error: Type mismatch in argument 'i' at (1); passed REAL(4) to INTEGER(4)


-- 


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


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