You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In most languages the natural thing to do is lexical scope here, which means that the second declaration takes precedence. That's how our scope analysis was programmed.
Fortran 2003 says 'C508 An entity shall not be explicitly given any attribute more than once in a scoping unit.'
However, as explained in the other report, we sometimes accept non-conforming programs because strict conformance was not a goal of the fortran-src project.
If you want to change this, check Renamer.hs where it establishes new names, to ensure that the same name was not already established in the current environment (rather than surrounding ones). I suspect there will be a subtlety in some corner cases where this change might backfire, however, so beware. If I ever get a chance, I'll take a look more closely.
I have tried to reprint the following code:
And lexer is not failed :-(
The text was updated successfully, but these errors were encountered: