New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid interference between different construct association in name resolutions #600
Conversation
Fix issue 598 and related issues. Transform resolve-names.cc ConstructVisitor association_ member into a stack so that different association construct (select-type, select-rank, change-team, associate) imbrication/succession do not interfere with each other leading to wrong erronous symbol resolution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job figuring this out!
lib/semantics/resolve-names.cc
Outdated
@@ -4407,6 +4440,20 @@ ConstructVisitor::Selector ConstructVisitor::ResolveSelector( | |||
x.u); | |||
} | |||
|
|||
ConstructVisitor::Association &ConstructVisitor::GetCurrentAssociation() { | |||
CHECK(associationStack_.size()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!associationStack_.empty()
makes the condition clearer. Also below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
…oltions Fix issue 598 and related issues. Transform resolve-names.cc ConstructVisitor association_ member into a stack so that different association construct (select-type, select-rank, change-team, associate) imbrication/succession do not interfere with each other leading to wrong erronous symbol resolution. Original-commit: flang-compiler/f18@5781f29 Reviewed-on: flang-compiler/f18#600 Tree-same-pre-rewrite: false
Original-commit: flang-compiler/f18@a346462 Reviewed-on: flang-compiler/f18#600
…/jpr-fix-598 Avoid interference between different construct association in name resolutions Original-commit: flang-compiler/f18@28c32a7 Reviewed-on: flang-compiler/f18#600
…oltions Fix issue 598 and related issues. Transform resolve-names.cc ConstructVisitor association_ member into a stack so that different association construct (select-type, select-rank, change-team, associate) imbrication/succession do not interfere with each other leading to wrong erronous symbol resolution. Original-commit: flang-compiler/f18@5781f29 Reviewed-on: flang-compiler/f18#600 Tree-same-pre-rewrite: false
Original-commit: flang-compiler/f18@a346462 Reviewed-on: flang-compiler/f18#600
Fix #598 and similar issues.
Transform
resolve-names.cc
ConstructVisitor
association_
member into a stack so that different association construct (select-type, select-rank, change-team, associate) imbrication/succession do not interfere with each other leading to erroneous symbol resolution.