PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / extends_16.f90
blob376fcaae49d4187da45b880fd381bb22e6e1987b
1 ! { dg-do run }
3 ! PR 57562: [OOP] ICE due to extended derived type with PARAMETER attribute
5 ! Contributed by <helvio.vairinhos@gmail.com>
7 type :: Parent
8 integer :: member1 = 0
9 end type
11 type, extends(Parent) :: Child
12 integer :: member2 = 0
13 end type
15 type, extends(Child) :: Grandchild
16 integer :: member3 = 0
17 end type
19 type(Grandchild), parameter :: object = Grandchild(23, 42, -99)
21 if (object%member1 /= 23) call abort
22 if (object%member2 /= 42) call abort
23 if (object%member3 /= -99) call abort
25 end