public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/44065]  New: Undefined reference to TBP
@ 2010-05-10 17:17 pchwood at yahoo dot com
  2010-05-10 17:32 ` [Bug libfortran/44065] " dominiq at lps dot ens dot fr
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: pchwood at yahoo dot com @ 2010-05-10 17:17 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1936 bytes --]

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-08-05 11:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-10 17:17 [Bug libfortran/44065] New: Undefined reference to TBP pchwood at yahoo dot com
2010-05-10 17:32 ` [Bug libfortran/44065] " dominiq at lps dot ens dot fr
2010-05-10 22:06 ` [Bug fortran/44065] [OOP] " janus at gcc dot gnu dot org
2010-06-06  3:38 ` [Bug fortran/44065] [OOP] Undefined reference to vtab$ janus at gcc dot gnu dot org
2010-07-17  8:49 ` janus at gcc dot gnu dot org
2010-08-03 16:37 ` janus at gcc dot gnu dot org
2010-08-03 16:44 ` janus at gcc dot gnu dot org
2010-08-03 16:54 ` janus at gcc dot gnu dot org
2010-08-03 17:01 ` dominiq at lps dot ens dot fr
2010-08-03 18:57 ` dominiq at lps dot ens dot fr
2010-08-04  8:32 ` janus at gcc dot gnu dot org
2010-08-04 19:49 ` janus at gcc dot gnu dot org
2010-08-04 20:05 ` janus at gcc dot gnu dot org
2010-08-04 22:59 ` dominiq at lps dot ens dot fr
2010-08-05 11:58 ` janus at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).