fix parsing of omp threadprivate dirs #13

Merged
Alexander_KS merged 1 commits from fix-omp into master 2023-10-31 17:21:44 +00:00
2 changed files with 2 additions and 8 deletions

View File

@@ -2609,17 +2609,11 @@ static bool findOmpThreadPrivDecl(SgStatement* st, map<SgStatement*, set<string>
{ {
st = st->lexNext(); st = st->lexNext();
if (st->variant() == CONTAINS_STMT)
break;
if (isSgExecutableStatement(st))
break;
auto res = parseOmpDirs(st, dummy); auto res = parseOmpDirs(st, dummy);
for (auto& dir : res) for (auto& dir : res)
for (auto& var : dir.threadPrivVars) for (auto& var : dir.threadPrivVars)
it->second.insert(var); it->second.insert(var);
} while (st != lastN); } while (st != lastN && !isSgExecutableStatement(st) && st->variant() != CONTAINS_STMT);
} }
if (it->second.find(toFind->identifier()) != it->second.end()) if (it->second.find(toFind->identifier()) != it->second.end())

View File

@@ -1,3 +1,3 @@
#pragma once #pragma once
#define VERSION_SPF "2229" #define VERSION_SPF "2230"