blob: 6eb9e7fa1b73b8e795381bfbe4c86d5f07a5553a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
! { dg-do run }
!
! Test the fix for PR70673
!
! Contributed by David Kinniburgh <davidgkinniburgh@yahoo.co.uk>
!
module m
contains
subroutine s(inp)
character(*), intent(in) :: inp
character(:), allocatable :: a
a = inp
a = a ! This used to ICE too
if ((len (a) .ne. 5) .or. (a .ne. "hello")) STOP 1
a = a(2:3) ! Make sure that temporary creation is not broken.
if ((len (a) .ne. 2) .or. (a .ne. "el")) STOP 2
deallocate (a)
end subroutine s
end module m
use m
call s("hello")
end
|