From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30203 invoked by alias); 10 May 2010 17:17:06 -0000 Received: (qmail 29856 invoked by uid 48); 10 May 2010 17:16:52 -0000 Date: Mon, 10 May 2010 17:17:00 -0000 Subject: [Bug libfortran/44065] New: Undefined reference to TBP X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pchwood at yahoo dot com" 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: 2010-05/txt/msg01016.txt.bz2 In the following testcase (tested against 4.6), a procedure bound to an attribute of a super class is not resolved in the subclass. The test case below doesn't go through the linker. The error message is: > gfortran -c -ffree-form module.f test.f > gfortran -o test test.o module.o module.o: In function `__module_mysubclass_MOD_init': module.f:(.text+0x19): undefined reference to `vtab$inner.1586' module.f:(.text+0x25): undefined reference to `vtab$inner.1586' module.f:(.text+0x2e): undefined reference to `vtab$inner.1586' collect2: ld a retourné 1 code d'état d'exécution (note that combining the two following files into a single one creates a segfault #44064) file module.f: module module_myclass implicit none type :: inner contains procedure :: set end type inner type :: myclass type(inner) :: slice end type myclass contains subroutine set(this) class(inner), intent(inout) :: this end subroutine set end module module_myclass module module_mysubclass use module_myclass, only : myclass implicit none type, extends(myclass) :: mysubclass contains procedure :: init end type mysubclass contains subroutine init(this) class(mysubclass), intent(inout) :: this call this%slice%set() ! XXX PROBLEM HERE this%slice not resolved end subroutine init end module module_mysubclass and file test.f: program test use module_mysubclass, only : mysubclass implicit none class(mysubclass), allocatable :: obs end program test -- Summary: Undefined reference to TBP Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pchwood at yahoo dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44065