[Bug fortran/49638] [OOP] length parameter is ignored when overriding type bound character functions with constant length.
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Aug 3 18:37:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49638
--- Comment #4 from janus at gcc dot gnu.org 2011-08-03 18:36:55 UTC ---
(In reply to comment #3)
> A check for different ranks can be added like this:
This will reject the following variant of the original test case, which is
accepted up to now:
module world
implicit none
type :: world_1
contains
procedure, nopass :: string => w1_string
end type
type, extends(world_1)::world_2
contains
procedure, nopass :: string => w2_string
end type
contains
function w1_string()
integer :: w1_string
w1_string = 1
end function
function w2_string()
integer,dimension(2) ::w2_string
w2_string = 2
end function
end module
program hello
use world
implicit none
type(world_1)::w1
type(world_2)::w2
print *,"hello world: hello",w1%string()
print *,"hello world2: hello",w2%string()
end program
More information about the Gcc-bugs
mailing list