! { dg-do run } ! PR46678 Wrong code with strings ! Test case prepared by Jerry DeLisle program test implicit none integer a(2) call sub(a,5) end program test subroutine sub(a,n) implicit none integer n integer a(n) character(25) :: results character(size(a)) :: string print *, size(a) string = '1234567890' write(results,'(a)') string if (results.ne.'12345') call abort end subroutine sub