Skip to content

Commit 740f14e

Browse files
authored
[flang] fix codegen warning from #73641 (#73808)
1 parent 16b8c96 commit 740f14e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flang/lib/Optimizer/CodeGen/CodeGen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3667,9 +3667,9 @@ struct BoxOffsetOpConversion : public FIROpConversion<fir::BoxOffsetOp> {
36673667
mlir::Type boxType = fir::unwrapRefType(boxOffset.getBoxRef().getType());
36683668
mlir::Type llvmBoxTy =
36693669
lowerTy().convertBoxTypeAsStruct(mlir::cast<fir::BaseBoxType>(boxType));
3670-
unsigned fieldId = boxOffset.getField() == fir::BoxFieldAttr::derived_type
3671-
? getTypeDescFieldId(boxType)
3672-
: kAddrPosInBox;
3670+
int fieldId = boxOffset.getField() == fir::BoxFieldAttr::derived_type
3671+
? getTypeDescFieldId(boxType)
3672+
: kAddrPosInBox;
36733673
rewriter.replaceOpWithNewOp<mlir::LLVM::GEPOp>(
36743674
boxOffset, pty, llvmBoxTy, adaptor.getBoxRef(),
36753675
llvm::ArrayRef<mlir::LLVM::GEPArg>{0, fieldId});

0 commit comments

Comments
 (0)