File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -1649,17 +1649,13 @@ void AccAttributeVisitor::Post(const parser::Name &name) {
1649
1649
1650
1650
Symbol *AccAttributeVisitor::ResolveAccCommonBlockName (
1651
1651
const parser::Name *name) {
1652
- if (auto *prev{name
1653
- ? GetContext ().scope .parent ().FindCommonBlock (name->source )
1654
- : nullptr }) {
1655
- name->symbol = prev;
1656
- return prev;
1652
+ if (!name) {
1653
+ return nullptr ;
1657
1654
}
1658
- // Check if the Common Block is declared in the current scope
1659
- if (auto *commonBlockSymbol{
1660
- name ? GetContext ().scope .FindCommonBlock (name->source ) : nullptr }) {
1661
- name->symbol = commonBlockSymbol;
1662
- return commonBlockSymbol;
1655
+ if (auto *cb{GetProgramUnitOrBlockConstructContaining (GetContext ().scope )
1656
+ .FindCommonBlock (name->source )}) {
1657
+ name->symbol = cb;
1658
+ return cb;
1663
1659
}
1664
1660
return nullptr ;
1665
1661
}
You can’t perform that action at this time.
0 commit comments