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

--- Comment #21 from kargl at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #19)
> > AFAICS everthing is fixed here. Can we close this PR?
> 
> Without objection I'll proceed.

Should the bug be fixed before proceeding?  See comment #2 and #3.

module funcs
   implicit none
   contains
      recursive function initialization(x) result(f)
         logical f
         integer x
         integer z(0*transfer(2.D0**2,1)+2)
         save

         z = 0
         if(x > 0) then
            z = 1
            f = initialization(x-1)
         end if
         f = z(1) == 0
      end function initialization

      recursive function non_initialization(x) result(f)
         logical f
         integer x
         integer z(0*transfer(2.D0**2.,1)+2)
         save

         z = 0
         if(x > 0) then
            z = 1
            f = non_initialization(x-1)

         end if
         f = z(1) == 0
      end function non_initialization
end module funcs

program exponent_test
   use funcs
   implicit none

   write(*,*) initialization(1), non_initialization(1)
end program exponent_test

Reply via email to