Skip to content

Commit

Permalink
[flang][omp] Heed valid build warning (llvm#88015)
Browse files Browse the repository at this point in the history
Address a bug found by a compiler warning, and thereby also fix -Werror
builds.
  • Loading branch information
klausler authored Apr 8, 2024
1 parent 1e6ce5e commit 119b9cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions flang/lib/Lower/OpenMP/ReductionProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,8 @@ mlir::Value
ReductionProcessor::getReductionOperation(fir::FirOpBuilder &builder,
mlir::Type type, mlir::Location loc,
mlir::Value op1, mlir::Value op2) {
assert(type.isIntOrIndexOrFloat() ||
fir::isa_complex(type) &&
"only integer, float and complex types are currently supported");
assert((type.isIntOrIndexOrFloat() || fir::isa_complex(type)) &&
"only integer, float and complex types are currently supported");
if (type.isIntOrIndex())
return builder.create<IntegerOp>(loc, op1, op2);
if (fir::isa_real(type))
Expand Down

0 comments on commit 119b9cd

Please sign in to comment.