>From the same thread as PR 35913. Found at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/8bc064b25f12ed91

The following should be rejected:

implicit none
real foo
interface
  subroutine foo()
  end subroutine foo
end interface
end

Adding "call foo()" shows that the gfortran thinks that "foo" is a function.
Similarly, the following is invalid -- and it is detected as invalid:

implicit none
real foo
interface
  real function foo() ! Function 'foo' at (1) already has a type of REAL
  end function foo
end interface
end

while the following is essentially identical, but the invalid code is not
detected:

implicit none
real foo
interface
  function foo()
    real foo
  end function foo
end interface
end


-- 
           Summary: Accepts invalid: INTERFACE <symbol> and REAL <symbol>
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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

Reply via email to