2 ! { dg-options "-fdec-structure -finit-derived -finit-local-zero" }
4 ! Test a UNION with explicit initialization and -finit-derived.
12 integer(4) :: x
= 1600
13 integer(4) :: y
= 1800
16 integer(2) a
, b
, c
, d
, e
, f
, g
, h
23 if ( r2
.i
.ne
. 8 ) then
24 print *, 'structure init'
28 ! Explicit initializations
29 if ( r2
.x
.ne
. 1600 .or
. r2
.y
.ne
. 1800) then
31 print *, 'union explicit init'
35 ! Initialization from -finit-derived
36 if ( r2
.h
.ne
. 0 ) then
38 print *, 'union default init'
44 ! Initialization expressions
49 integer(4) :: x
= 1600
50 integer(4) :: y
= 1800
53 integer(2) a
, b
, c
, d
, e
61 if ( r3
.i
.ne
. 8 ) then
62 print *, 'structure init'
66 ! Explicit initializations
67 if ( r3
.x
.ne
. 1600 .or
. r3
.y
.ne
. 1800) then
69 print *, 'union explicit init'
73 ! Initialization from -finit-derived
74 if ( r3
.e
.ne
. 0 ) then
76 print *, 'union default init'