File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -1480,17 +1480,15 @@ void OmpStructureChecker::CheckThreadprivateOrDeclareTargetVar(
14801480 }
14811481 },
14821482 [&](const parser::Name &name) {
1483- if (!name.symbol ) {
1484- return ;
1485- }
1486- if (auto *cb{name.symbol ->detailsIf <CommonBlockDetails>()}) {
1487- for (const auto &obj : cb->objects ()) {
1488- if (FindEquivalenceSet (*obj)) {
1489- context_.Say (name.source ,
1490- " A variable in a %s directive cannot appear in an EQUIVALENCE statement"
1491- " (variable '%s' from common block '/%s/')" _err_en_US,
1492- ContextDirectiveAsFortran (), obj->name (),
1493- name.symbol ->name ());
1483+ if (name.symbol ) {
1484+ if (auto *cb{name.symbol ->detailsIf <CommonBlockDetails>()}) {
1485+ for (const auto &obj : cb->objects ()) {
1486+ if (FindEquivalenceSet (*obj)) {
1487+ context_.Say (name.source ,
1488+ " A variable in a %s directive cannot appear in an EQUIVALENCE statement (variable '%s' from common block '/%s/')" _err_en_US,
1489+ ContextDirectiveAsFortran (), obj->name (),
1490+ name.symbol ->name ());
1491+ }
14941492 }
14951493 }
14961494 }
You can’t perform that action at this time.
0 commit comments