libgfortran/ChangeLog:
[official-gcc.git] / gcc / testsuite / gfortran.dg / associated_6.f90
blobb31c5bb9159f050540042f14b1ff3140aca47cc2
1 ! { dg-do run }
3 ! PR 54881: [4.8 Regression] [OOP] ICE in fold_convert_loc, at fold-const.c:2016
5 ! Contributed by Richard L Lozes <richard@lozestech.com>
7 implicit none
9 type treeNode
10 type(treeNode), pointer :: right => null()
11 end type
13 type(treeNode) :: n
15 if (associated(RightOf(n))) call abort()
16 allocate(n%right)
17 if (.not.associated(RightOf(n))) call abort()
18 deallocate(n%right)
20 contains
22 function RightOf (theNode)
23 class(treeNode), pointer :: RightOf
24 type(treeNode), intent(in) :: theNode
25 RightOf => theNode%right
26 end function
28 end