[PATCH] D120460: [flang] Fix lowering OpenMP/OpenACC declarative constructs in non-module unit

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 26 01:21:47 PST 2022


kiranchandramohan added a comment.

Can you check why the patch application fails?



================
Comment at: flang/lib/Lower/PFTBuilder.cpp:321
     if constexpr (lower::pft::isDeclConstruct<A>) {
-      popEvaluationList();
-      pftParentStack.pop_back();
-      constructAndDirectiveStack.pop_back();
-      popEvaluationList();
+      if (pftParentStack.back().getIf<lower::pft::ModuleLikeUnit>()) {
+        popEvaluationList();
----------------
What happens without this code?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120460/new/

https://reviews.llvm.org/D120460



More information about the llvm-commits mailing list