2 ! { dg-options "-fdec-structure" }
4 ! Test whether union backend declarations are corrently _not_ copied when they
5 ! are not in fact equal. The structure defined in sub() is seen later, but
6 ! where siz has a different value.
10 character(*), intent(in
) :: s
16 integer, parameter :: siz
= 1024
23 character(8) cbuf(siz
)
31 r6
.ibuf(1) = int(z
'badbeef')
32 r6
.ibuf(2) = int(z
'badbeef')
35 ! Repeat definition from subroutine sub with different size parameter.
36 ! If the structure definition is copied here the stack may get messed up.
37 integer, parameter :: siz
= 65536
44 character(8) cbuf(siz
)
53 integer :: r6_canary
= 0
55 ! Copied type declaration - this should not cause problems
58 r6
.ibuf(i
) = int(z
'badbeef')
62 if ( r6_canary
.ne
. 0 ) then
63 call aborts ('copied decls: overflow')