Skip to content

Conversation

@klausler
Copy link
Contributor

@klausler klausler commented Apr 8, 2024

Address a bug found by a compiler warning, and thereby also fix -Werror builds.

Address a bug found by a compiler warning, and thereby also
fix -Werror builds.
@klausler klausler requested a review from clementval April 8, 2024 17:17
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Apr 8, 2024
@llvmbot
Copy link
Member

llvmbot commented Apr 8, 2024

@llvm/pr-subscribers-flang-fir-hlfir

Author: Peter Klausler (klausler)

Changes

Address a bug found by a compiler warning, and thereby also fix -Werror builds.


Full diff: https://github.com/llvm/llvm-project/pull/88015.diff

1 Files Affected:

  • (modified) flang/lib/Lower/OpenMP/ReductionProcessor.h (+2-3)
diff --git a/flang/lib/Lower/OpenMP/ReductionProcessor.h b/flang/lib/Lower/OpenMP/ReductionProcessor.h
index 7ea252fde3602e..8b116a4c520411 100644
--- a/flang/lib/Lower/OpenMP/ReductionProcessor.h
+++ b/flang/lib/Lower/OpenMP/ReductionProcessor.h
@@ -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))

@klausler klausler requested a review from vzakhari April 8, 2024 18:57
@klausler klausler merged commit 119b9cd into llvm:main Apr 8, 2024
@klausler klausler deleted the fix-build branch April 8, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang:fir-hlfir flang Flang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants