https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96986
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
Priority|P5 |P4
Status|WAITING |NEW
--- Comment #5 from kargl at gcc dot gnu.org ---
The code is valid. Gfortran error message is bogus. The pertinent
part of the Fortran standard is the last sentence here:
If the ENTRY statement is in a subroutine subprogram, an additional
subroutine is defined by that subprogram. The name of the subroutine
is entry-name. The dummy arguments of the subroutine are those
specified in the ENTRY statement
The entry statement 'entry func_a()' in question has no dummy arguments.
The portion of the Fortran standard quoted in comment #2 clearly
does not apply.
Also note that the requirement of an explicit interface comes if a
programmer wants to call 'entry func_b(va)'. Thus, the following
code is also conforming.
subroutine bar(va)
integer, volatile :: va
va = 42
end subroutine bar
program foo
integer n
interface
subroutine bar(va)
integer, volatile :: va
end subroutine bar
end interface
call bar(n)
print *, n
end program foo