This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49638] New: [OOP] length parameter is ignored when overriding type bound character functions with constant length.
- From: "boschmann at tp1 dot physik.uni-siegen.de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 5 Jul 2011 08:04:20 +0000
- Subject: [Bug fortran/49638] New: [OOP] length parameter is ignored when overriding type bound character functions with constant length.
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49638
Summary: [OOP] length parameter is ignored when overriding type
bound character functions with constant length.
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: boschmann@tp1.physik.uni-siegen.de
module world
implicit none
type::world_1
contains
procedure,nopass::string=>w1_string
end type world_1
type,extends(world_1)::world_2
contains
procedure,nopass::string=>w2_string
end type world_2
contains
function w1_string()
character(6)::w1_string
w1_string=" world"
end function w1_string
function w2_string()
character(7)::w2_string
w2_string=" world2"
end function w2_string
end module world
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 hello
This program compiles and runs fine with gfortran 4.6.1 and gfortran 4.7.
Nevertheless, the length of an array is a type parameter and all type
parameters of an overriding function shall match the overridden type
parameters.