blob: 08bdf6cb3d492299b3798e707e4f39dc451ab6cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
! { dg-do run }
!
! PR 54881: [4.8 Regression] [OOP] ICE in fold_convert_loc, at fold-const.c:2016
!
! Contributed by Richard L Lozes <richard@lozestech.com>
implicit none
type treeNode
type(treeNode), pointer :: right => null()
end type
type(treeNode) :: n
if (associated(RightOf(n))) STOP 1
allocate(n%right)
if (.not.associated(RightOf(n))) STOP 2
deallocate(n%right)
contains
function RightOf (theNode)
class(treeNode), pointer :: RightOf
type(treeNode), intent(in) :: theNode
RightOf => theNode%right
end function
end
|