| 1 |
! { dg-do compile } |
| 2 |
! internal compiler error: in gfc_build_dummy_array_decl, at |
| 3 |
! fortran/trans-decl.cc:1317 |
| 4 |
! |
| 5 |
! Contributed by Gerhard Steinmetz <[email protected]> |
| 6 |
! |
| 7 |
program p |
| 8 |
type t0 |
| 9 |
integer :: i |
| 10 |
end type |
| 11 |
type t |
| 12 |
class(t0), allocatable :: a(:) |
| 13 |
end type |
| 14 |
class(t0), allocatable :: arg(:) |
| 15 |
allocate (arg, source = [t0(1), t0(2)]) |
| 16 |
call s(arg) |
| 17 |
contains |
| 18 |
subroutine s(x) |
| 19 |
class(t0) :: x(:) |
| 20 |
type(t) :: z |
| 21 |
associate (y => x) |
| 22 |
z%a = y |
| 23 |
end associate |
| 24 |
if (size(z%a) .ne. 2) stop 1 |
| 25 |
end |
| 26 |
end |