2 ! { dg-options "-fdec-structure" }
4 ! Test passing STRUCTUREs through functions and subroutines.
8 character(*), intent(in
) :: s
13 module dec_structure_7m
27 ! Pass structure through subroutine
28 subroutine sub (rec1
, i
)
30 integer, intent(in
) :: i
35 ! Pass structure through function
36 function func (rec2
, r
)
47 program dec_structure_7
55 ! Passing through functions and subroutines
60 junk
= func (r2
, -20.14)
62 if (r1
.i1
.ne
. 10) then
63 call aborts("sub(r1, 10)")
66 if (r2
.r1
.r1
.ne
. -20.14) then
67 call aborts("func(r2, -20.14)")
70 if (junk
.ne
. -20.14) then
72 call aborts("junk = func()")