libgfortran/ChangeLog:
[official-gcc.git] / gcc / testsuite / gfortran.dg / namelist_78.f90
blobd4e29ab8228389804a69482ef7f854213b023882
1 ! { dg-do run }
3 ! PR libfortran/51825
4 ! Test case regarding namelist problems with derived types
6 program namelist
8 type d1
9 integer :: j = 0
10 end type d1
12 type d2
13 type(d1) k
14 end type d2
16 type d3
17 type(d2) d(2)
18 end type d3
20 type(d3) der
21 namelist /nmlst/ der
23 open (10, status='scratch')
24 write (10, '(a)') "&NMLST"
25 write (10, '(a)') " DER%D(1)%K%J = 1,"
26 write (10, '(a)') " DER%D(2)%K%J = 2,"
27 write (10, '(a)') "/"
28 rewind(10)
29 read(10, nml=nmlst)
30 close (10)
32 if (der%d(1)%k%j /= 1) call abort
33 if (der%d(2)%k%j /= 2) call abort
34 end program namelist