comparison gcc/testsuite/gfortran.dg/associated_6.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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
15 if (associated(RightOf(n))) call abort()
16 allocate(n%right)
17 if (.not.associated(RightOf(n))) call abort()
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