This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/54082] New: Program name shadows other entities with the same name
- From: "tob.brandt at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 24 Jul 2012 12:49:59 +0000
- Subject: [Bug fortran/54082] New: Program name shadows other entities with the same name
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54082
Bug #: 54082
Summary: Program name shadows other entities with the same name
Classification: Unclassified
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: tob.brandt@googlemail.com
If the name of a program is the same as the name of another
entity (e.g. a function), that entity can not be used in
the program.
---
Example:
program abs
print *, abs(-1)
end program
Compiling above program fails with this confusing error:
print *, abs(-1)
1
Error: Symbol at (1) is not appropriate for an expression
---
I'm not sure if the program is standard conform or not.
If it isn't, then the error message could be improved.