PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_result_2.f90
blobbe37a1991da8686572fe6a3b6a19547f161d4429
1 ! { dg-do compile }
3 ! PR 59414: [OOP] Class array pointers: compile error on valid code (Different ranks in pointer assignment)
5 ! Contributed by Antony Lewis <antony@cosmologist.info>
7 implicit none
9 Type TObjectList
10 end Type
12 Class(TObjectList), pointer :: Arr(:)
13 Arr => ArrayItem()
15 contains
17 function ArrayItem() result(P)
18 Class(TObjectList), pointer :: P(:)
19 end function
21 end