Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flang][omp] Heed valid build warning #88015

Merged
merged 1 commit into from
Apr 8, 2024
Merged

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
Collaborator

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
7 checks passed
@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.

None yet

3 participants