1      subroutine test1
2      character*8 c
3      character*1 d, f
4      dimension d(2), f(2)
5      character*4 e
6      equivalence (c(1:1), d(1)), (c(3:5), e(2:4)), (c(6:6), f(2))
7      c='abcdefgh'
8      if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') STOP 1
9      if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') STOP 2
10      end subroutine test1
11      subroutine test2
12      equivalence (c(1:1), d(1)), (c(3:5), e(2:4)), (c(6:6), f(2))
13      character*8 c
14      character*1 d, f
15      dimension d(2), f(2)
16      character*4 e
17      c='abcdefgh'
18      if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') STOP 3
19      if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') STOP 4
20      end subroutine test2
21      subroutine test3
22      character*8 c
23      character*1 d, f
24      character*4 e
25      equivalence (c(1:1), d(1)), (c(3:5), e(2:4)), (c(6:6), f(2))
26      dimension d(2), f(2)
27      c='abcdefgh'
28      if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') STOP 5
29      if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') STOP 6
30      end subroutine test3
31      subroutine test4
32      dimension d(2), f(2)
33      equivalence (c(1:1), d(1)), (c(3:5), e(2:4)), (c(6:6), f(2))
34      character*8 c
35      character*1 d, f
36      character*4 e
37      c='abcdefgh'
38      if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') STOP 7
39      if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') STOP 8
40      end subroutine test4
41      program main
42      call test1
43      call test2
44      call test3
45      call test4
46      end program main
47