[llvm] [flang][runtime] Better handling for integer input into null address (PR #135987)

Andre Kuhlenschmidt via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 16 10:52:40 PDT 2025


================
@@ -188,7 +188,11 @@ static RT_API_ATTRS char ScanNumericPrefix(IoStatementState &io,
 
 RT_API_ATTRS bool EditIntegerInput(IoStatementState &io, const DataEdit &edit,
     void *n, int kind, bool isSigned) {
-  RUNTIME_CHECK(io.GetIoErrorHandler(), kind >= 1 && !(kind & (kind - 1)));
+  auto &handler{io.GetIoErrorHandler()};
+  RUNTIME_CHECK(handler, kind >= 1 && !(kind & (kind - 1)));
+  if (!n) {
+    io.GetIoErrorHandler().Crash("Null address for integer input item");
----------------
akuhlens wrote:

Do you want to use `handler` here?

https://github.com/llvm/llvm-project/pull/135987


More information about the llvm-commits mailing list