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

--- Comment #1 from G. Steinmetz <gs...@t-online.de> ---

This variant compiles and works :


$ cat z3.f90
program p
   call s
contains
   subroutine s
      character(:), allocatable :: y
      allocate (y, source=f('abcdefffffffffff'))
      print *, len(y), y
   end
   function f(x) result(z)
      character(*) :: x
      character(:), allocatable :: z
      allocate (z, source=x)
   end
end


$ gfortran-9-20181125 z3.f90 -O2 -static-libgfortran
$ a.out
          16 abcdefffffffffff
$

Reply via email to