! { dg-do-run }
!
! Contributed by Gerhard Steinmetz  <gscfq@t-online.de>
!
program p
   type t
      character(:), allocatable :: a(:)
   end type
   type(t) :: x
   x = t(["abc "])                    ! Didn't assign anything
!   allocate (x%a(1), source = 'abc') ! Worked OK
   associate (y => x%a)
         if (any (y .ne. 'abc ')) stop 1
      associate (z => x%a)
         if (any (y .ne. z)) stop 2
      end associate
   end associate
   deallocate (x%a)
end
