1! { dg-do compile }
2!
3! PR 54881: [4.8 Regression] [OOP] ICE in fold_convert_loc, at fold-const.c:2016
4!
5! Contributed by Richard L Lozes <richard@lozestech.com>
6
7  implicit none
8
9  type treeNode
10  end type
11
12  class(treeNode), pointer :: theNode
13  logical :: lstatus
14  
15  select type( theNode )
16  type is (treeNode)
17    call DestroyNode (theNode, lstatus )
18  class is (treeNode)
19    call DestroyNode (theNode, lstatus )
20  end select
21  
22contains
23
24  subroutine DestroyNode( theNode, lstatus )
25    type(treeNode), pointer :: theNode
26    logical, intent(out) :: lstatus
27  end subroutine
28  
29end 
30