[flang-commits] [flang] 255be51 - [Flang][OpenMP] Fix missing dereference in isConstructWithTopLevelTarget
via flang-commits
flang-commits at lists.llvm.org
Tue Aug 5 21:49:06 PDT 2025
Author: agozillon
Date: 2025-08-05T23:46:31-05:00
New Revision: 255be51f3f64ff6ef20c6379c3f3fdae5504813b
URL: https://github.com/llvm/llvm-project/commit/255be51f3f64ff6ef20c6379c3f3fdae5504813b
DIFF: https://github.com/llvm/llvm-project/commit/255be51f3f64ff6ef20c6379c3f3fdae5504813b.diff
LOG: [Flang][OpenMP] Fix missing dereference in isConstructWithTopLevelTarget
This was causing false negatives, yielding incorrect programs.
Added:
Modified:
flang/lib/Lower/OpenMP/DataSharingProcessor.cpp
Removed:
################################################################################
diff --git a/flang/lib/Lower/OpenMP/DataSharingProcessor.cpp b/flang/lib/Lower/OpenMP/DataSharingProcessor.cpp
index eee208a16648d..67a9a4675f115 100644
--- a/flang/lib/Lower/OpenMP/DataSharingProcessor.cpp
+++ b/flang/lib/Lower/OpenMP/DataSharingProcessor.cpp
@@ -47,7 +47,7 @@ bool DataSharingProcessor::OMPConstructSymbolVisitor::isSymbolDefineBy(
static bool isConstructWithTopLevelTarget(lower::pft::Evaluation &eval) {
const auto *ompEval = eval.getIf<parser::OpenMPConstruct>();
if (ompEval) {
- auto dir = parser::omp::GetOmpDirectiveName(ompEval).v;
+ auto dir = parser::omp::GetOmpDirectiveName(*ompEval).v;
if (llvm::omp::topTargetSet.test(dir))
return true;
}
More information about the flang-commits
mailing list