From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 813 invoked by alias); 5 Jul 2011 08:04:38 -0000 Received: (qmail 801 invoked by uid 22791); 5 Jul 2011 08:04:36 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Jul 2011 08:04:20 +0000 From: "boschmann at tp1 dot physik.uni-siegen.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/49638] New: [OOP] length parameter is ignored when overriding type bound character functions with constant length. X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: boschmann at tp1 dot physik.uni-siegen.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 05 Jul 2011 08:04:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg00288.txt.bz2 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.