aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/finalize_23.f90
blob: ea3972981dab53bc7756d0202fa357c0cb5b5e11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
! { dg-do compile }
!
! PR 60234: [4.9 Regression] [OOP] ICE in generate_finalization_wrapper at fortran/class.c:1883
!
! Contribued by Antony Lewis <antony@cosmologist.info>

module ObjectLists
    implicit none

    Type TObjectList
    contains
      FINAL :: finalize
    end Type

    Type, extends(TObjectList):: TRealCompareList
    end Type

contains

  subroutine finalize(L)
    Type(TObjectList) :: L
  end subroutine


  integer function CompareReal(this)
    Class(TRealCompareList) :: this
  end function

end module

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