2 ! { dg-options "-std=legacy" }
5 ! verifies that functions returning derived type work
17 integer arr(5,5), vect(25), vect2(25)
21 arr
= reshape (vect
, shape(arr
))
22 r
= f(i
,real(i
),"HALLO",arr
)
24 if (r
%i
.ne
. i
) call abort()
25 if (r
%x
.ne
. real(i
)) call abort()
26 if (r
%c
.ne
. "HALLO") call abort()
27 vect2
= reshape (r
%arr
, shape(vect2
))
28 if (any(vect2
.ne
.vect
)) call abort()
42 ! { dg-final { cleanup-modules "m" } }