OSDN Git Service

2009-08-20 Thomas Koenig <tkoenig@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / equiv_constraint_9.f90
1 ! { dg-do compile }
2 !
3 ! PR fortran/34655
4 !
5 ! Check for F2003's 5.5.2.5 Restrictions on common and equivalence
6 ! Test case contributed by Joost VandeVondele.
7 !
8 implicit none
9 type data_type
10  sequence
11  integer :: I = 7
12 end type data_type
13
14
15 type data_type2
16  sequence
17  integer :: I
18 end type data_type2
19
20 type(data_type) :: dd, ff
21 type(data_type2) :: gg
22 integer :: j, k, m
23 EQUIVALENCE(dd,J) ! { dg-error "with default initialization cannot be in EQUIVALENCE with a variable in COMMON" }
24 EQUIVALENCE(ff,k)
25 EQUIVALENCE(gg,m)
26 COMMON /COM/ j
27 COMMON /COM/ m
28 END