[flang-commits] [PATCH] D132153: [flang][runtime] Improve error message for incompatible MATMUL arguments

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Aug 18 13:59:28 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf5884fd9de6c: [flang][runtime] Improve error message for incompatible MATMUL arguments (authored by klausler).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132153

Files:
  flang/runtime/matmul.cpp


Index: flang/runtime/matmul.cpp
===================================================================
--- flang/runtime/matmul.cpp
+++ flang/runtime/matmul.cpp
@@ -184,9 +184,11 @@
   }
   SubscriptValue n{x.GetDimension(xRank - 1).Extent()};
   if (n != y.GetDimension(0).Extent()) {
-    terminator.Crash("MATMUL: arrays do not conform (%jd != %jd)",
+    terminator.Crash("MATMUL: unacceptable operand shapes (%jdx%jd, %jdx%jd)",
+        static_cast<std::intmax_t>(x.GetDimension(0).Extent()),
         static_cast<std::intmax_t>(n),
-        static_cast<std::intmax_t>(y.GetDimension(0).Extent()));
+        static_cast<std::intmax_t>(y.GetDimension(0).Extent()),
+        static_cast<std::intmax_t>(y.GetDimension(1).Extent()));
   }
   using WriteResult =
       CppTypeFor<RCAT == TypeCategory::Logical ? TypeCategory::Integer : RCAT,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132153.453775.patch
Type: text/x-patch
Size: 841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220818/498093a3/attachment.bin>


More information about the flang-commits mailing list