[flang-commits] [flang] [flang] Fix compilation error due to variable no being used (PR #75210)

Pete Steinfeld via flang-commits flang-commits at lists.llvm.org
Tue Dec 12 08:11:10 PST 2023


https://github.com/psteinfeld created https://github.com/llvm/llvm-project/pull/75210

My builds were failing because the variable 'dim' was not used.  This produced a warning, and my builds have warnings set as errors.

>From 6900fdafd872ebb7d158bd675b01ac5e36db8452 Mon Sep 17 00:00:00 2001
From: Peter Steinfeld <psteinfeld at nvidia.com>
Date: Tue, 12 Dec 2023 08:06:16 -0800
Subject: [PATCH] [flang] Fix compilation error due to variable no being used

My builds were failing because the variable 'dim' was not used.  This
produced a warning, and my builds have warnings set as errors.
---
 flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp b/flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
index 6af2888b3a60d..46eee8acac24b 100644
--- a/flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
+++ b/flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
@@ -663,7 +663,6 @@ template <typename NumericalReductionOp>
 static mlir::LogicalResult
 verifyArrayAndMaskForReductionOp(NumericalReductionOp reductionOp) {
   mlir::Value array = reductionOp->getArray();
-  mlir::Value dim = reductionOp->getDim();
   mlir::Value mask = reductionOp->getMask();
 
   fir::SequenceType arrayTy =



More information about the flang-commits mailing list