111
|
1 ! { dg-do run }
|
|
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 type(treeNode), pointer :: right => null()
|
|
11 end type
|
|
12
|
|
13 type(treeNode) :: n
|
|
14
|
131
|
15 if (associated(RightOf(n))) STOP 1
|
111
|
16 allocate(n%right)
|
131
|
17 if (.not.associated(RightOf(n))) STOP 2
|
111
|
18 deallocate(n%right)
|
|
19
|
|
20 contains
|
|
21
|
|
22 function RightOf (theNode)
|
|
23 class(treeNode), pointer :: RightOf
|
|
24 type(treeNode), intent(in) :: theNode
|
|
25 RightOf => theNode%right
|
|
26 end function
|
|
27
|
|
28 end
|