This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/44064] New: ICE with file containing two modules and one program


The following testcase segfaults in 4.6:

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

program test

    use module_mysubclass, only : mysubclass
    implicit none

    class(mysubclass), allocatable :: obs

end program test


-- 
           Summary: ICE with file containing two modules and one program
           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=44064


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]