Fix compilation failure with C++98 compilers
[official-gcc.git] / gcc / testsuite / gfortran.dg / extends_16.f90
blob069e3d079d5379b955c534bbdf9f0b3d1983a0ed
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) STOP 1
22 if (object%member2 /= 42) STOP 1
23 if (object%member3 /= -99) STOP 1
25 end