9727b06813
When a USE statement is encountered, find the scope corresponding to the module. This is now stored in the ModuleDetails of the module symbol. useModuleScope_ tracks this while processing the USE. Currently only modules defined in the same file work because we don't have module files. At the end of a USE that isn't a use-only, add all public names that were not renamed. AddUse() handles recording of a USE by creating a local symbol with UseDetails that tracks the use-symbol in the module and the location of the USE (for error messages). If an ambiguous USE is detected, the UseDetails are replaced by UseErrorDetails. This tracks the locations of all the uses so that they can be referenced in a diagnostic. Detect attempts to re-declare use-associated symbols as well as changing their attributes (except for ASYNCHRONOUS and VOLATILE). Add missing checks for access-stmt in scoping units other than modules. Add tests for the new errors. Reorganize the MessageHandler::Say() overloadings to prevent them from becoming too numerous. Original-commit: flang-compiler/f18@cc0523134c Reviewed-on: https://github.com/flang-compiler/f18/pull/79 |
||
---|---|---|
.. | ||
semantics |