File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2749,17 +2749,17 @@ void OmpStructureChecker::Leave(const parser::OmpClauseList &) {
27492749 std::get<parser::OmpClause::Detach>(detachClause->u )};
27502750 if (const auto *name{parser::Unwrap<parser::Name>(detach.v .v )}) {
27512751 if (name->symbol ) {
2752- std::string eventHandleSymName {name->ToString ()};
2752+ Symbol *eventHandleSym {name->symbol -> GetUltimate ()};
27532753 auto checkVarAppearsInDataEnvClause = [&](const parser::OmpObjectList
27542754 &objs,
27552755 std::string clause) {
27562756 for (const auto &obj : objs.v ) {
27572757 if (const parser::Name *objName{
27582758 parser::Unwrap<parser::Name>(obj)}) {
2759- if (objName->ToString () == eventHandleSymName ) {
2759+ if (objName->symbol -> GetUltimate () == eventHandleSym ) {
27602760 context_.Say (GetContext ().clauseSource ,
27612761 " A variable: `%s` that appears in a DETACH clause cannot appear on %s clause on the same construct" _err_en_US,
2762- eventHandleSymName , clause);
2762+ objName-> source , clause);
27632763 }
27642764 }
27652765 }
You can’t perform that action at this time.
0 commit comments