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

--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> 
---
Whereas, detected with explicit result variable :

$ cat z5a.f90
program p
   integer i
   print *, [(f(i), i=1,3)]
contains
   function f(n) result(z)
      integer :: n
      character(:) :: z
      character(3) :: c = 'abc'
      z = c(n:n)
   end
end

$ gfortran -g -O0 -Wall -fcheck=all z5a.f90
z5a.f90:5:26:

    function f(n) result(z)
                          1
Error: Entity 'z' at (1) has a deferred type parameter and requires either the
pointer or allocatable attribute

Reply via email to