blob: 5b1921d5d1a44fdb5898c4b41e63810258296e42 (
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 }
! PR fortran/65766
! Substrings of allocatable string components of derived types
program substr_derived_alloc_comp
implicit none
type t1
character(len=:), allocatable :: s
end type t1
character(len=*), parameter :: c = &
"0123456789abcdefghijklmnopqrstuvwxyz"
type(t1) x1
integer i
x1%s = c
do i = 1, 36
if (x1%s(i:) .ne. c(i:)) STOP 1
end do
end program
|