aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/unlimited_polymorphic_8.f90
blob: 3b40e131efb0ef62717fedc4109cc7d75e3e8724 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! { dg-do compile }
! { dg-options "-fdump-tree-original" }
!
! PR fortran/55854
!
! Contributed by Damian Rouson
!

  type foo
    class(*), allocatable :: x
  end type
contains
  subroutine bar(this)
    type(foo), intent(out) :: this
  end
end

! { dg-final { scan-tree-dump-times "foo.0.x._data = 0B;" 1 "original" } }
! { dg-final { scan-tree-dump-times "foo.0.x._vptr = .* &__vtab__STAR;" 1 "original" } }
! { dg-final { cleanup-tree-dump "original" } }