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: "paulthomas2 at wanadoo dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Aug 2005 07:54:43 -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 paulthomas2 at wanadoo dot fr 2005-08-02 07:54 -------
I do apologise for missing this one: My fix for PR16940 fixes this fellow too.
I would be grateful if the reporters can give the latest cvs a whirl to confirm
that this is the case.
This expanded testcase now works:
module foo
implicit none
interface bar
module procedure bar1, bar2
end interface
contains
function bar1 (arg)
integer arg
logical bar1
bar1 = (arg==0)
end function
function bar2 (arg)
real arg
logical bar2
bar2 = (arg==0)
end function
subroutine baz
logical l
l = bar (3)
print *, "BAZ: bar (0) =", bar (0), " bar (1.0) =", bar (1.0)
end subroutine
end module foo
program test_18108
use foo
print *, "bar (0) =", bar (0), " bar (1) =", bar (1)
print *, "bar (0.0) =", bar (0.0), " bar (1.0) =", bar (1.0)
call baz ()
end program test_18108
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18108