[flang] Fix scope accessibility check
The check for whether a private component is accessible was depending on determining whether the source range of the current scope was within the source range of the module that the component was declared in. This could fail if the current scope was of kind `ImpliedDos` and had no source range. The fix is to add `Scope::Contains` to check the relationship by traversing the parent links. These are created when the Scope is so are always reliable. The source range of a scope is built up over time. Original-commit: flang-compiler/f18@d787108637adad358ccf8af3d200acb3f66ce099 Reviewed-on: https://github.com/flang-compiler/f18/pull/1060
Loading
Please sign in to comment