https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94536
Bug ID: 94536 Summary: result keyword not working within module function interface in combination with a module procedure body Product: gcc Version: 8.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: zinphi03 at hotmail dot com Target Milestone: --- Created attachment 48245 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48245&action=edit Example source code Version: -------------------------------------------------------------------------- GNU Fortran (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0 -------------------------------------------------------------------------- Example: (test_modproc.f90) -------------------------------------------------------------------------- module test_modproc implicit none interface test module function itest(input) result(output) !NOT WORKING implicit none integer, intent(in) :: input integer :: output end function itest module function rtest(input) implicit none real, intent(in) :: input real :: rtest !WORKING end function rtest end interface contains module procedure itest output=2*input !ERROR "Symbol 'output' at (1) has no IMPLICIT type" end procedure itest module procedure rtest rtest=2*input !NO ERROR end procedure rtest end module test_modproc -------------------------------------------------------------------------- Compiler command: -------------------------------------------------------------------------- gfortran -c test_modproc.f90 -------------------------------------------------------------------------- Compiler error output: -------------------------------------------------------------------------- test_modproc.f90:24:14: output=2*input !ERROR "Symbol 'output' at (1) has no IMPLICIT type" 1 Error: Symbol 'output' at (1) has no IMPLICIT type; did you mean 'input'? --------------------------------------------------------------------------