* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gfortran.dg / dec_init_1.f90
blob5e1956aed73f3d87d49c284c211623b0833fdc48
1 ! { dg-do run }
2 ! { dg-options "-fdec-structure -finit-derived -finit-local-zero" }
4 ! Test -finit-derived with DEC structure and union.
7 subroutine dummy(i1,r1,c1,l1,i2,r2,c2,l2)
8 implicit none
9 integer, intent(in) :: i1
10 real, intent(in) :: r1
11 character, intent(in) :: c1
12 logical, intent(in) :: l1
13 integer, intent(inout) :: i2
14 real, intent(inout) :: r2
15 character, intent(inout) :: c2
16 logical, intent(inout) :: l2
17 print *, i1, i2, l1, l2, ichar(c1), ichar(c2), r1, r2
18 if ( i1 .ne. 0 .or. i2 .ne. 0 ) call abort()
19 if ( l1 .or. l2 ) call abort()
20 if ( c1 .ne. achar(0) .or. c2 .ne. achar(0) ) call abort()
21 if ( r1 .ne. 0.0 .or. r2 .ne. 0.0 ) call abort()
22 end subroutine
24 structure /s3/
25 union
26 map
27 integer m11
28 real m12
29 character m13
30 logical m14
31 end map
32 map
33 logical m21
34 character m22
35 real m23
36 integer m24
37 end map
38 end union
39 end structure
41 structure /s2/
42 integer i2
43 real r2
44 character c2
45 logical l2
46 end structure
48 structure /s1/
49 logical l1
50 real r1
51 character c1
52 integer i1
53 record /s2/ y
54 end structure
56 record /s1/ x
57 record /s3/ y
59 call dummy (x.i1, x.r1, x.c1, x.l1, x.y.i2, x.y.r2, x.y.c2, x.y.l2)
60 call dummy (y.m11, y.m12, y.m13, y.m14, y.m24, y.m23, y.m22, y.m21)
62 end