OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [class_array_12.f03] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do compile }
!
! PR fortran/51754
! This program was leading to an ICE related to class arrays
!
! Contributed by Andrew Benson <abenson@caltech.edu>

module test
  private

  type :: componentB
  end type componentB

  type :: treeNode
     class(componentB), allocatable, dimension(:) :: componentB
  end type treeNode

contains

  function BGet(self)
    implicit none
    class(componentB), pointer :: BGet
    class(treeNode), target, intent(in) :: self
    select type (self)
    class is (treeNode)
       BGet => self%componentB(1)
    end select
    return
  end function BGet

end module test

! { dg-final { cleanup-modules "test" } }

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.