aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/class_18.f03
blob: 01850e630de98c6a99beecd2a419920f659c5a6a (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)) STOP 1
  cp => t
  if (.not. associated(cp)) STOP 2

end