This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35918] New: Accepts invalid: INTERFACE <symbol> and REAL <symbol>
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Apr 2008 20:10:14 -0000
- Subject: [Bug fortran/35918] New: Accepts invalid: INTERFACE <symbol> and REAL <symbol>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
>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