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] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR fortran/51754
4
! This program was leading to an ICE related to class arrays
5
!
6
! Contributed by Andrew Benson 
7
 
8
module test
9
  private
10
 
11
  type :: componentB
12
  end type componentB
13
 
14
  type :: treeNode
15
     class(componentB), allocatable, dimension(:) :: componentB
16
  end type treeNode
17
 
18
contains
19
 
20
  function BGet(self)
21
    implicit none
22
    class(componentB), pointer :: BGet
23
    class(treeNode), target, intent(in) :: self
24
    select type (self)
25
    class is (treeNode)
26
       BGet => self%componentB(1)
27
    end select
28
    return
29
  end function BGet
30
 
31
end module test
32
 
33
! { dg-final { cleanup-modules "test" } }

powered by: WebSVN 2.1.0

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