From 7cce1dbcea77613d8fe3da7684421c020b6e8317 Mon Sep 17 00:00:00 2001 From: Ivan Radanov Ivanov Date: Mon, 19 Aug 2024 17:16:22 +0900 Subject: [PATCH] Fix uninitialized memory bug in genLoopNest --- flang/include/flang/Optimizer/Builder/HLFIRTools.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flang/include/flang/Optimizer/Builder/HLFIRTools.h b/flang/include/flang/Optimizer/Builder/HLFIRTools.h index 69874719572186..f073f494b3fb21 100644 --- a/flang/include/flang/Optimizer/Builder/HLFIRTools.h +++ b/flang/include/flang/Optimizer/Builder/HLFIRTools.h @@ -357,8 +357,8 @@ hlfir::ElementalOp genElementalOp( /// Structure to describe a loop nest. struct LoopNest { - mlir::Operation *outerOp; - mlir::Block *body; + mlir::Operation *outerOp = nullptr; + mlir::Block *body = nullptr; llvm::SmallVector oneBasedIndices; };