[Bug fortran/38594] [4.4 Regression] module function name mangled improperly if contained function of same name exists
tkoenig at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Dec 26 09:11:00 GMT 2008
------- 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
More information about the Gcc-bugs
mailing list