https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83864
--- Comment #1 from G. Steinmetz <gscfq@t-online.de> ---
Works outside of a type :
$ cat z2.f90
program p
character :: c(3) = transfer('abc','z',3)
print *, c
end
$ gfortran-8-20180114 z2.f90 -static-libgfortran
$ a.out
abc