Skip to content
Commit 6ab50745 authored by Tim Keith's avatar Tim Keith
Browse files

[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
parent 749be799
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment