diff options
Diffstat (limited to 'flang/lib/Semantics/check-omp-structure.cpp')
| -rw-r--r-- | flang/lib/Semantics/check-omp-structure.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp index 4141630..e094458f 100644 --- a/flang/lib/Semantics/check-omp-structure.cpp +++ b/flang/lib/Semantics/check-omp-structure.cpp @@ -98,7 +98,7 @@ bool OmpStructureChecker::Enter(const parser::BlockData &x) { } else { for (const Scope &scope : context_.globalScope().children()) { if (scope.kind() == Scope::Kind::BlockData) { - if (scope.symbol()->name().empty()) { + if (auto *s{scope.symbol()}; !s || s->name().empty()) { scopeStack_.push_back(&scope); break; } |
