[flang-commits] [PATCH] D114474: [flang] Fix reversed comparison in RESHAPE() runtime

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Nov 26 12:34:21 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG45a8caf1cdf6: [flang] Fix reversed comparison in RESHAPE() runtime (authored by klausler).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114474/new/

https://reviews.llvm.org/D114474

Files:
  flang/runtime/transformational.cpp


Index: flang/runtime/transformational.cpp
===================================================================
--- flang/runtime/transformational.cpp
+++ flang/runtime/transformational.cpp
@@ -385,7 +385,7 @@
   std::size_t elementBytes{source.ElementBytes()};
   std::size_t sourceElements{source.Elements()};
   std::size_t padElements{pad ? pad->Elements() : 0};
-  if (resultElements < sourceElements) {
+  if (resultElements > sourceElements) {
     RUNTIME_CHECK(terminator, padElements > 0);
     RUNTIME_CHECK(terminator, pad->ElementBytes() == elementBytes);
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114474.390108.patch
Type: text/x-patch
Size: 572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20211126/4d8269c3/attachment.bin>


More information about the flang-commits mailing list