2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / alloc_comp_constraint_2.f90
blobc37edb6bc48a929f4e07a7f1fc03837ff07bf55c
1 ! { dg-do compile }
2 ! Check that equivalence with allocatable components isn't allowed (PR 20541)
3 program main
5 type :: foo
6 sequence
7 integer, allocatable :: x(:)
8 end type foo
10 type(foo) :: a
11 integer :: b
13 equivalence (a, b) ! { dg-error "cannot have ALLOCATABLE components" }
15 end program main