================ @@ -2224,10 +2260,13 @@ genSectionsOp(lower::AbstractConverter &converter, lower::SymMap &symTable, lower::pft::Evaluation &eval, mlir::Location loc, const ConstructQueue &queue, ConstructQueue::const_iterator item) { - assert(!sectionsStack.empty()); + const parser::OpenMPSectionsConstruct *sectionsConstruct = + getSectionsConstructStackTop(converter); + assert(sectionsConstruct); + const auto §ionBlocks = - std::get<parser::OmpSectionBlocks>(sectionsStack.back()->t); - sectionsStack.pop_back(); + std::get<parser::OmpSectionBlocks>(sectionsConstruct->t); + converter.getStateStack().stackPop(); ---------------- skatrak wrote:
Nit: Wouldn't it be possible to let this call be handled by the same function that pushes the stack frame? We could potentially use `SaveStateStack` then. https://github.com/llvm/llvm-project/pull/144898 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits