[flang-commits] [flang] [Flang][OpenMP] Make implicitly captured scalars fully firstprivatized (PR #147442)
Leandro Lupori via flang-commits
flang-commits at lists.llvm.org
Tue Jul 8 13:04:26 PDT 2025
================
@@ -2444,7 +2473,15 @@ void OmpAttributeVisitor::CreateImplicitSymbols(const Symbol *symbol) {
useLastDeclSymbol();
PRINT_IMPLICIT_RULE("3) enclosing context");
} else if (targetDir) {
- // TODO 4) not mapped target variable -> firstprivate
+ // 4) not mapped target variable -> firstprivate
+ // - i.e. implicit, but meets OpenMP specification rules for
+ // firstprivate "promotion"
+ if (enableDelayedPrivatizationStaging && symbol &&
----------------
luporl wrote:
`symbol` can't be NULL, as that is one of the conditions checked before calling `CreateImplicitSymbols`.
In the future, it would be good to change its `symbol` parameter to a reference.
https://github.com/llvm/llvm-project/pull/147442
More information about the flang-commits
mailing list