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

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


Following program compiles smoothly and runs ...
Invocations of function h need obligatoric parenthesis, and a dummy.
On the other hand, "implicit none" would force variable h to be
explicitly declared.


$ cat z2.f90
module m
   implicit none
contains
   logical function f()
      f = h
   end function
   logical function g()
      g = .not. h
   end function
   logical function h(x)
      logical, intent(in) :: x
      h = .not. x
   end function
end
program p
   use m
   print *, f()
   print *, g()  ! .not. f()
end


$ gfortran-9-20181021-chk -Wall -Wextra -fcheck=all -static-libgfortran -g
z2.f90
$ a.out
 F
 F

Reply via email to