2 ! Test fixes for PR109451
3 ! Contributed by Harald Anlauf <anlauf@gcc.gnu.org>
7 character(4) :: c(2) = ["abcd","efgh"]
12 character(len
=*), intent(in
) :: a(:)
13 character(:), allocatable
:: b(:)
16 associate (q
=> b(:)) ! no ICE but print repeated first element
18 print *, q
! Checked with dg-output
21 call test (b
, ["bc ","fg "], 4)
23 associate (q
=> b(:)(:)) ! ICE
25 associate (r
=> q(:)(1:3))
26 call test (r
, a(:)(1:3), 5)
29 associate (q
=> b(:)(2:3))
30 call test (q
, a(:)(2:3), 6)
34 ! The associate vars in dsc0 had string length not set
36 character(len
=*), intent(in
) :: a(:)
43 associate (q
=> a(:)(:))
48 subroutine test (x
, y
, i
)
49 character(len
=*), intent(in
) :: x(:), y(:)
50 integer, intent(in
) :: i
51 if (any (x
.ne
. y
)) stop i
54 ! { dg-output " abcdefgh" }