This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30973] New: undetected name conflict: variables may be named like modules
- From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Feb 2007 14:42:46 -0000
- Subject: [Bug fortran/30973] New: undetected name conflict: variables may be named like modules
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$> cat foo.f90
MODULE foo
END MODULE
PROGRAM test_foo
USE foo, ONLY:
INTEGER :: foo
foo = 1
END PROGRAM
$> gfortran-svn -g -Wall foo.f90 && echo ok
ok
$> gfortran-svn -v
gcc version 4.3.0 20070220 (experimental)
If ", ONLY:" is removed in the USE, gfortran gives:
foo.f90:6.16:
INTEGER :: foo
1
Error: Symbol 'foo' at (1) cannot have a type
--
Summary: undetected name conflict: variables may be named like
modules
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dfranke at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30973