1! { dg-do run }
2
3program truc
4implicit none
5
6type t_env_table
7    character(len=:), allocatable :: key
8end type
9
10type(t_env_table), dimension(:), allocatable :: environment_table
11
12character(len=:), allocatable :: s
13
14allocate(environment_table(1))
15environment_table(1)%key='tt'
16
17allocate(s, source=environment_table(1)%key)
18
19if ( .not. allocated(s) ) call abort()
20if ( s /= "tt" ) call abort()
21if ( len(s) /= 2 ) call abort()
22!print *, 's:"', s, '" derived:"',environment_table(1)%key,'"'
23
24end program
25