annotate gcc/testsuite/gfortran.dg/dec_init_1.f90 @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 ! { dg-options "-fdec-structure -finit-derived -finit-local-zero" }
kono
parents:
diff changeset
3 !
kono
parents:
diff changeset
4 ! Test -finit-derived with DEC structure and union.
kono
parents:
diff changeset
5 !
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 subroutine dummy(i1,r1,c1,l1,i2,r2,c2,l2)
kono
parents:
diff changeset
8 implicit none
kono
parents:
diff changeset
9 integer, intent(in) :: i1
kono
parents:
diff changeset
10 real, intent(in) :: r1
kono
parents:
diff changeset
11 character, intent(in) :: c1
kono
parents:
diff changeset
12 logical, intent(in) :: l1
kono
parents:
diff changeset
13 integer, intent(inout) :: i2
kono
parents:
diff changeset
14 real, intent(inout) :: r2
kono
parents:
diff changeset
15 character, intent(inout) :: c2
kono
parents:
diff changeset
16 logical, intent(inout) :: l2
kono
parents:
diff changeset
17 print *, i1, i2, l1, l2, ichar(c1), ichar(c2), r1, r2
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
18 if ( i1 .ne. 0 .or. i2 .ne. 0 ) STOP 1
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
19 if ( l1 .or. l2 ) STOP 2
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
20 if ( c1 .ne. achar(0) .or. c2 .ne. achar(0) ) STOP 3
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
21 if ( r1 .ne. 0.0 .or. r2 .ne. 0.0 ) STOP 4
111
kono
parents:
diff changeset
22 end subroutine
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 structure /s3/
kono
parents:
diff changeset
25 union
kono
parents:
diff changeset
26 map
kono
parents:
diff changeset
27 integer m11
kono
parents:
diff changeset
28 real m12
kono
parents:
diff changeset
29 character m13
kono
parents:
diff changeset
30 logical m14
kono
parents:
diff changeset
31 end map
kono
parents:
diff changeset
32 map
kono
parents:
diff changeset
33 logical m21
kono
parents:
diff changeset
34 character m22
kono
parents:
diff changeset
35 real m23
kono
parents:
diff changeset
36 integer m24
kono
parents:
diff changeset
37 end map
kono
parents:
diff changeset
38 end union
kono
parents:
diff changeset
39 end structure
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 structure /s2/
kono
parents:
diff changeset
42 integer i2
kono
parents:
diff changeset
43 real r2
kono
parents:
diff changeset
44 character c2
kono
parents:
diff changeset
45 logical l2
kono
parents:
diff changeset
46 end structure
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 structure /s1/
kono
parents:
diff changeset
49 logical l1
kono
parents:
diff changeset
50 real r1
kono
parents:
diff changeset
51 character c1
kono
parents:
diff changeset
52 integer i1
kono
parents:
diff changeset
53 record /s2/ y
kono
parents:
diff changeset
54 end structure
kono
parents:
diff changeset
55
kono
parents:
diff changeset
56 record /s1/ x
kono
parents:
diff changeset
57 record /s3/ y
kono
parents:
diff changeset
58
kono
parents:
diff changeset
59 call dummy (x.i1, x.r1, x.c1, x.l1, x.y.i2, x.y.r2, x.y.c2, x.y.l2)
kono
parents:
diff changeset
60 call dummy (y.m11, y.m12, y.m13, y.m14, y.m24, y.m23, y.m22, y.m21)
kono
parents:
diff changeset
61
kono
parents:
diff changeset
62 end