1! { dg-do compile }
2! Check that equivalence with allocatable components isn't allowed (PR 20541)
3program main
4
5    type :: foo
6        sequence
7        integer, allocatable :: x(:)
8    end type foo
9
10    type(foo) :: a
11    integer :: b
12
13    equivalence (a, b) ! { dg-error "cannot have ALLOCATABLE components" }
14
15end program main
16