[Bug fortran/44917] [OOP] Detect ambiguous specifics in a generic TBP interface
janus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Jul 12 08:59:00 GMT 2010
------- Comment #1 from janus at gcc dot gnu dot org 2010-07-12 08:59 -------
Reduced version:
module m
type :: t1
integer :: i = 42
contains
procedure, pass :: make_integer
generic, public :: extract => make_integer
end type t1
type, extends(t1) :: t2
integer :: j = 99
contains
procedure, pass :: make_integer_2
generic, public :: extract => make_integer_2
end type t2
contains
integer function make_integer (arg, arg2)
class(t1), intent(in) :: arg
integer :: arg2
make_integer = arg%i * arg2
end function make_integer
integer function make_integer_2 (arg, arg2)
class(t2), intent(in) :: arg
integer :: arg2
make_integer_2 = arg%j * arg2
end function make_integer_2
end module m
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44917
More information about the Gcc-bugs
mailing list