| 1 |
! { dg-do compile } |
| 2 |
! PR fortran/60560 |
| 3 |
! |
| 4 |
! Original test case by Marco Restelli. |
| 5 |
|
| 6 |
module mstr |
| 7 |
implicit none |
| 8 |
contains |
| 9 |
subroutine sub(s) |
| 10 |
character(len=*), allocatable, intent(out) :: s(:) |
| 11 |
character(len=len(s)), allocatable :: s_tmp(:) |
| 12 |
allocate(s_tmp(5)) |
| 13 |
allocate(s(size(s_tmp))) ! OK |
| 14 |
allocate(s_tmp(5),s(size(s_tmp))) ! { dg-error "same ALLOCATE statement" } |
| 15 |
allocate(s_tmp(5),s(len(s_tmp))) ! { dg-error "same ALLOCATE statement" } |
| 16 |
end subroutine sub |
| 17 |
end module mstr |