https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56670
Seth Johnson <johnsonsr at ornl dot gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |johnsonsr at ornl dot gov --- Comment #11 from Seth Johnson <johnsonsr at ornl dot gov> --- I confirm that with both 10.2 and 8.3, the example code prints the erroneous warning with `-O0` and works as expected (no warning) with `-O1` and higher. ``` $FC "-Wall" -O1 -c ./ftest.f90 ``` ```fortran subroutine do_stuff() character(len=*), parameter :: src = "nope" character(len=:), allocatable :: dst dst = src write(*,*) dst end subroutine ```