This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/18108] [gfortran] overloading does not work for functions
- 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: 15 Jul 2005 20:25:34 -0000
- Subject: [Bug fortran/18108] [gfortran] overloading does not work for functions
- References: <20041022084631.18108.martin@mpa-garching.mpg.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From tkoenig at gcc dot gnu dot org 2005-07-15 20:25 -------
(In reply to comment #16)
> This is one bad nasty ugly bug.
Yep.
This "works" (for small values of "works") if the IMPLICIT NONE
is omitted.
The problem appears to be that resolve_symbol() doesn't find the
generic function, but sets the symbol to a variable of default
type using gfc_set_default_type(). Without IMPLICIT NONE, this is
harmless and will get corrected later on. With IMPLICIT NONE,
gfc_set_default_type() throws an error.
I can think of two solutions:
a) Find a way for resolve_symbol() to look at the generic functions
b) Save type error checking for later, when generics have been resolved.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18108