2 ! { dg-options "-fdump-tree-original" }
5 ! Test that access to inherited components are properly generated
7 ! Stripped down from extends_1.f03
13 type, extends(person) :: education
14 integer :: attainment = 0
17 type, extends(education) :: service
18 integer :: personnel_number = 0
21 type, extends(service) :: person_record
22 type (person_record), pointer :: supervisor => NULL ()
23 end type person_record
25 type(person_record) :: recruit
28 ! Check that references by ultimate component and by parent type work
29 ! All the following component access are equivalent
32 recruit%education%ss = 4
33 recruit%education%person%ss = 5
34 recruit%service%ss = 6
35 recruit%service%person%ss = 7
36 recruit%service%education%ss = 8
37 recruit%service%education%person%ss = 9
40 ! { dg-final { scan-tree-dump-times " +recruit\\.service\\.education\\.person\\.ss =" 8 "original"} }