blob: 37c178e2ca8e1a7b0c7e634a6421d361935a335a [file] [log] [blame]
! PR fortran/113503
! { dg-do compile }
! { dg-options "-O2 -fno-inline -Wuninitialized" }
program pr113503
implicit none
type :: T
character(len=:), allocatable :: u
end type
character(len=20) :: us(1) = 'foobar'
type(T) :: x
x = T(u = trim (us(1))) ! { dg-bogus "is used uninitialized" }
call foo
contains
subroutine foo
if (x%u /= 'foobar') stop 1
end subroutine
end