aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/class_18.f03
blob: 576f931f96909368772f5c0b517fc4c515a7f221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do run }
!
! PR 43207: [OOP] ICE for class pointer => null() initialization
!
! Original test case by Tobias Burnus <burnus@gcc.gnu.org>
! Modified by Janus Weil <janus@gcc.gnu.org>

  implicit none
  type :: parent
  end type
  type(parent), target :: t
  class(parent), pointer :: cp => null()

  if (associated(cp)) call abort()
  cp => t
  if (.not. associated(cp)) call abort()

end