1 ! Program to test initialization of equivalence blocks. PR13742.
2 ! Some forms are not yet implemented. These are indicated by !!$
5 character*10 :: x = "abcdefghij"
10 character*10 :: ys(10)
12 data xs /10*"abcdefghij"/
14 if (y.ne."abcdefghij") call abort
15 if (ys(1).ne."abcdefghij") call abort
16 if (ys(10).ne."abcdefghij") call abort
23 if (y.ne.123) call abort
33 if (x.ne.1) call abort
34 if (z.ne.3) call abort
35 if (a(1).ne.1) call abort
36 if (a(3).ne.3) call abort
45 if (x.ne.123) call abort
46 if (z.ne.123) call abort
54 equivalence (a(1),x), (a(2),y), (a(3),z)
55 data a(1) /1/, a(3) /3/
56 if (x.ne.1) call abort
57 !!$ if (y.ne.2) call abort
58 if (z.ne.3) call abort
65 equivalence (a(2),b(1)), (b(2),c)
68 if (b(1).ne.2) call abort
69 if (b(2).ne.3) call abort
76 !!$ equivalence (a(2),b(1)), (b(2),c)
80 !!$ if (a(2).ne.2) call abort
81 !!$ if (b(2).ne.3) call abort
82 !!$ print *, "Passed test5"