Skip to content

Commit

Permalink
[flang] [stack-arrays] fix unused variable warning
Browse files Browse the repository at this point in the history
  • Loading branch information
tblah committed Jun 5, 2023
1 parent 985f5af commit 76c3c5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flang/lib/Optimizer/Transforms/StackArrays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,8 @@ static mlir::Value convertAllocationType(mlir::PatternRewriter &rewriter,
return stack;

fir::HeapType firHeapTy = mlir::cast<fir::HeapType>(heapTy);
fir::ReferenceType firRefTy = mlir::cast<fir::ReferenceType>(stackTy);
LLVM_ATTRIBUTE_UNUSED fir::ReferenceType firRefTy =
mlir::cast<fir::ReferenceType>(stackTy);
assert(firHeapTy.getElementType() == firRefTy.getElementType() &&
"Allocations must have the same type");

Expand Down

0 comments on commit 76c3c5b

Please sign in to comment.