This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38594] [4.4 Regression] module function name mangled improperly if contained function of same name exists
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Dec 2008 09:10:25 -0000
- Subject: [Bug fortran/38594] [4.4 Regression] module function name mangled improperly if contained function of same name exists
- References: <bug-38594-13648@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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