2014-07-12 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / equiv_2.f90
blobee671f964fdfd3dfc48618cc29a49a731848b6ba
1 ! { dg-do compile }
2 ! { dg-options "-std=legacy" }
4 subroutine broken_equiv1
5 character*4 h
6 character*3 i
7 equivalence (h(1:3), i(2:1)) ! { dg-error "has length zero" }
8 end subroutine
10 subroutine broken_equiv2
11 character*4 j
12 character*2 k
13 equivalence (j(2:3), k(1:5)) ! { dg-error "exceeds the string length" }
14 end subroutine
16 subroutine broken_equiv3
17 character*4 l
18 character*2 m
19 equivalence (l(2:3:4), m(1:2)) ! { dg-error "\[Ss\]yntax error" }
20 end subroutine