2 ! { dg-options "-ffrontend-optimize" }
3 ! PR 80988 - implied do loops with diagonal elements
4 ! were not written correctly
8 integer, dimension(3,3) :: a
9 integer, dimension(3,3,3) :: b
10 character(len
=40) :: line
11 a
= reshape([(((i
*10+j
),i
=1,3),j
=1,3)], shape(a
))
13 write (unit
=line
,fmt
='(10I3)') (a(i
,i
),i
=1,3)
14 if (line
/= ' 11 22 33') call abort
15 write (unit
=line
,fmt
='(10I3)') (a(i
+1,i
+1),i
=1,2)
16 if (line
/= ' 22 33') call abort
20 b(i
,j
,k
) = i
*100 + j
*10 + k
25 write (unit
=line
,fmt
='(10I4)') ((b(i
,j
,i
),i
=1,3),j
=1,3)
26 if (line
/= ' 111 212 313 121 222 323 131 232 333') call abort