gcc/testsuite/gfortran.dg/alloc_comp_constraint_2.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! Check that equivalence with allocatable components isn't allowed (PR 20541) |
| 3 | program 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 | |
| 15 | end program main |