2 ! { dg-options -std=gnu }
3 ! PR55117 Programs fails namelist read (contains derived types objects)
4 program test_type_extension
10 type, extends(tk_t
) :: tke_t
11 character(8) :: string
14 type, extends(tke_t
) :: deep
17 character(10) :: the_name
34 type (plain_type
) :: varpy
39 type(some_other
) :: somethinelse
43 namelist /test_NML
/ trouble
, somethinelse
, tke
, answer
46 tke
%string
= "xxxxxxxx"
50 trouble
%string
= "yyyy"
51 trouble
%the_name
= "mischief"
53 open(10, status
="scratch")
55 write(10,*) "&TEST_NML"
56 write(10,*) "TKE%X= 3.14 ,"
57 write(10,*) "TKE%STRING='kf7rcc',"
58 write(10,*) "ANSWER= 42,"
63 if (tke
%x
- 3.14000010 > .00001) call abort
64 if (tke
%string
/= "kf7rcc") call abort
65 if (answer
/= 42) call abort
! hitchkikers guide to the galaxy
66 end program test_type_extension