Skip to content

Commit 23d1a17

Browse files
committed
fix test for g++ build
fix warning
1 parent 6114f8f commit 23d1a17

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

flang/lib/Optimizer/CodeGen/CodeGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ struct XEmboxOpConversion : public EmboxCommonConversion<fir::cg::XEmboxOp> {
13251325
// We have a subcomponent. The step value needs to be the number of
13261326
// bytes per element (which is a derived type).
13271327
auto ty0 = base.getType();
1328-
auto ptrTy = ty0.dyn_cast<mlir::LLVM::LLVMPointerType>();
1328+
[[maybe_unused]] auto ptrTy = ty0.dyn_cast<mlir::LLVM::LLVMPointerType>();
13291329
assert(ptrTy && "expected pointer type");
13301330
auto memEleTy = fir::dyn_cast_ptrEleTy(xbox.memref().getType());
13311331
assert(memEleTy && "expected fir pointer type");

flang/test/Lower/forall.f90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,11 +1093,11 @@ subroutine test_forall_with_ranked_dimension
10931093
! CHECK: %[[VAL_5:.*]] = fir.array_load %[[VAL_3]](%[[VAL_4]]) : (!fir.ref<!fir.array<10x10x!fir.type<_QFtest_forall_with_ranked_dimensionTt{arr:!fir.array<11xi32>}>>>, !fir.shape<2>) -> !fir.array<10x10x!fir.type<_QFtest_forall_with_ranked_dimensionTt{arr:!fir.array<11xi32>}>>
10941094
! CHECK-DAG: %[[VAL_16:.*]] = constant 10 : i64
10951095
! CHECK-DAG: %[[NV_1:.*]] = constant 1 : i64
1096-
! CHECK: %[[NV_2:.*]] = subi %[[VAL_16]], %[[NV_1]] : i64
1097-
! CHECK: %[[NV_3:.*]] = constant 1 : i64
1098-
! CHECK: %[[NV_4:.*]] = addi %[[NV_2]], %[[NV_3]] : i64
1099-
! CHECK: %[[NV_5:.*]] = constant 1 : i64
1100-
! CHECK: %[[NV_6:.*]] = divi_signed %[[NV_4]], %[[NV_5]] : i64
1096+
! CHECK-DAG: %[[NV_2:.*]] = subi %[[VAL_16]], %{{.*}} : i64
1097+
! CHECK-DAG: %[[NV_3:.*]] = constant 1 : i64
1098+
! CHECK-DAG: %[[NV_4:.*]] = addi %[[NV_2]], %{{.*}} : i64
1099+
! CHECK-DAG: %[[NV_5:.*]] = constant 1 : i64
1100+
! CHECK: %[[NV_6:.*]] = divi_signed %[[NV_4]], %{{.*}} : i64
11011101
! CHECK: %[[NV_7:.*]] = constant 0 : i64
11021102
! CHECK: %[[NV_8:.*]] = cmpi sgt, %[[NV_6]], %[[NV_7]] : i64
11031103
! CHECK: %[[NV_9:.*]] = select %[[NV_8]], %[[NV_6]], %[[NV_7]] : i64

0 commit comments

Comments
 (0)