Debian Codegraph @

gcc/testsuite/gfortran.dg/class_result_2.f90

raw
1 ! { dg-do compile }
2 !
3 ! PR 59414: [OOP] Class array pointers: compile error on valid code (Different ranks in pointer assignment)
4 !
5 ! Contributed by Antony Lewis <[email protected]>
6
7 implicit none
8
9 Type TObjectList
10 end Type
11
12 Class(TObjectList), pointer :: Arr(:)
13 Arr => ArrayItem()
14
15 contains
16
17 function ArrayItem() result(P)
18 Class(TObjectList), pointer :: P(:)
19 end function
20
21 end