summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/equiv_constraint_7.f90
blob: f999d00665bf56f0806bcb6d3e975e21a5dda746 (plain)
1
2
3
4
5
6
7
8
9
10
11
! { dg-do compile }
! { dg-options "-O0" }
! PR20890 - Equivalence cannot contain overlapping unequal initializers.
! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
! Started out being in BLOCK DATA; however, blockdata variables must be in
! COMMON and therefore cannot have F95 style initializers....
 MODULE DATA
  INTEGER :: I=1,J=2
  EQUIVALENCE(I,J)  ! { dg-error "Overlapping unequal initializers" }
 END MODULE DATA
 END