This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/57778] New: Missing warning for -Wimplicit-procedure for dummy arguments
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 02 Jul 2013 15:24:11 +0000
- Subject: [Bug fortran/57778] New: Missing warning for -Wimplicit-procedure for dummy arguments
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57778
Bug ID: 57778
Summary: Missing warning for -Wimplicit-procedure for dummy
arguments
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
Based on https://groups.google.com/forum/#!topic/comp.lang.fortran/3idUN6kMjjo
The following program should give a warning with -Wimplicit-procedure - but it
doesn't.
Expected:
* Intel (no special options):
z.f90(14): warning #6717: This name has not been given an explicit type.
[FUN]
subroutine l1(inp,fun,outp)
------------------^
* gfortran (for non dummy arguments):
Warning: Procedure 'fun' called at (1) is not explicitly declared
Note: -Wimplicit-procedure does not warn when one uses EXTERNAL.
Seemingly, the using it as dummy argument someone creates an EXTERNAL attribute
- at least there is no warning in the following case.
module subs
implicit none
!! The following is in the original code, but not relevant for this PR
!! However, the warning is also required with this code.
! interface
! subroutine fun(inp,outp)
! real,intent(in) :: inp
! real,intent(out) :: outp
! end subroutine fun
! end interface
contains
subroutine l1(inp,fun,outp)
implicit none
real,intent(in) :: inp
real,intent(out) :: outp
call fun(inp,outp)
end subroutine l1
end module subs