This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/54082] New: Program name shadows other entities with the same name


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]