[Bug fortran/48847] New: Wrong "unused parameter" warning with interface block

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 2 20:38:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48847

           Summary: Wrong "unused parameter" warning with interface block
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tkoenig@gcc.gnu.org


Original test case by Ondrej Certik from
http://gcc.gnu.org/ml/fortran/2011-04/msg00297.html

Reduced test case:

module foo
contains
  function f(g)
    interface
       real function g()
       end function g
    end interface
    real :: f
    f = g()
  end function f
end module foo
ig25@linux-fd1f:~/Krempel/Warn> gfortran -c -Wunused-parameter b.f90
b.f90:3:0: warning: unused parameter 'g' [-Wunused-parameter]

Same warning in 4.4, so probably not a regression.



More information about the Gcc-bugs mailing list