From 93d5bc6f2ac35ae5c541841aa415242ebab430a1 Mon Sep 17 00:00:00 2001 From: Ian Giestas Pauli Date: Thu, 4 May 2023 17:29:08 -0300 Subject: [PATCH 1/2] Fixes #706 - failure due unassigned value to a intent(out) variable. Co-authored-by: degawa --- 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 From b192342050bbd1bd323db4ed99569eec68385588 Mon Sep 17 00:00:00 2001 From: Ian Giestas Pauli Date: Thu, 4 May 2023 17:32:13 -0300 Subject: [PATCH 2/2] Update src/stdlib_io_npy_load.fypp --- src/stdlib_io_npy_load.fypp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stdlib_io_npy_load.fypp b/src/stdlib_io_npy_load.fypp index 1d0468251..05c82b1a5 100644 --- a/src/stdlib_io_npy_load.fypp +++ b/src/stdlib_io_npy_load.fypp @@ -123,7 +123,7 @@ contains character :: buf(4) logical :: fortran_order - ! stat should be zero by default, if no error occured + ! stat should be zero if no error occurred stat = 0 read(io, iostat=stat) header