https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88455
--- Comment #2 from Adam Hirst <adam at aphirst dot karoo.co.uk> --- Slightly reduced - the issue occurs even in the MAIN program: program test implicit none integer :: a, b, c character(:), allocatable :: line(:) a = 1; b = 10; c = 30 allocate( line(a:b), source = repeat(" ",c) ) end program test ...and also if the integers are declared PARAMETER: program test implicit none integer, parameter :: a=1, b=10, c=30 character(:), allocatable :: line(:) allocate( line(a:b), source = repeat(" ",c) ) end program test ...and even if they're hard-coded into the ALLOCATE call: program test implicit none character(:), allocatable :: line(:) allocate( line(1:10), source = repeat(" ",30) ) end program test Yet, as far as I understand the Fortran standard, the string `line` here should be considered fully allocated by the ALLOCATE statement, therefore I think the warning is spurious.