https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63469

zmi <zmi007 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zmi007 at gmail dot com

--- Comment #4 from zmi <zmi007 at gmail dot com> ---
I found this simple snippet in comp.lang.fortran newsgroup thread "Problem with
automatic reallocation of allocatable scalar on assignment" and it fails now
after some modification with the last version of gfortran I have

GNU Fortran (SUSE Linux) 5.3.1 20151207 [gcc-5-branch revision 231355]

program test
implicit none
 character(len=:), allocatable :: temp
 integer :: i
 do i = 1,1
 temp='abcdef'
 temp=temp(3:)
 write(*,'("|",A,"|")') temp
 deallocate(temp)
 enddo
end program test

./test.x
|cd  |

Note that if we remove dummy "do i= ... end do" we obtain expected substring
./test.x
|cdef|

Reply via email to