Debian Codegraph @

gcc/testsuite/gfortran.dg/pdt_22.f03

raw
1 ! { dg-do run }
2 !
3 ! Tests the fix for PR82622 comment #1, where the declaration of
4 ! 'x' choked during initialization. Once fixed, it was found that
5 ! IO was not working correctly for PDT array components.
6 !
7 ! Contributed by Gerhard Steinmetz <[email protected]>
8 !
9 program p
10 character(120) :: buffer
11 integer :: i(4)
12 type t(a)
13 integer, len :: a
14 end type
15 type t2(b)
16 integer, len :: b
17 type(t(1)) :: r(b)
18 end type
19 type(t2(3)) :: x
20 write (buffer,*) x
21 read (buffer,*) i
22 if (any (i .ne. [3,1,1,1])) STOP 1
23 end