From 5e014753c35ca2cff118cf4fa7ee7936017e6446 Mon Sep 17 00:00:00 2001 From: Ian Giestas Pauli Date: Thu, 4 May 2023 17:21:05 -0300 Subject: [PATCH] Fixes #706 - spurious failure due unassigned value in intent(out) argument. --- src/stdlib_io_npy_load.fypp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stdlib_io_npy_load.fypp b/src/stdlib_io_npy_load.fypp index 01fce87a9..1d0468251 100644 --- a/src/stdlib_io_npy_load.fypp +++ b/src/stdlib_io_npy_load.fypp @@ -122,7 +122,10 @@ contains character(len=8) :: header character :: buf(4) logical :: fortran_order - + + ! stat should be zero by default, if no error occured + stat = 0 + read(io, iostat=stat) header if (stat /= 0) return