aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/select_type_22.f03
blob: 68d2ff6a1693bf232b67ed613c14e48171a97de4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do compile }
!
! PR 47330: [OOP] ICE on invalid source in connection with SELECT TYPE
!
! Contributed by Andrew Benson <abenson@its.caltech.edu>

  type treeNode
  end type
contains
  subroutine proc1 (thisNode)
    class (treeNode), target :: thisNode
    select type (thisNode)
    type is (treeNode)
       workNode => thisNode  ! { dg-error "Non-POINTER in pointer association context" }
    end select
  end subroutine
end