diff --git a/src/stdlib_experimental_io.f90 b/src/stdlib_experimental_io.f90 index 05f0a256f..6097d735b 100644 --- a/src/stdlib_experimental_io.f90 +++ b/src/stdlib_experimental_io.f90 @@ -335,15 +335,15 @@ integer function open(filename, mode, iostat) result(u) select case (mode_(3:3)) case('t') - access_='sequential' form_='formatted' case('b', 's') - access_='stream' form_='unformatted' case default call error_stop("Unsupported mode: "//mode_(3:3)) end select +access_ = 'stream' + if (present(iostat)) then open(newunit=u, file=filename, & action = action_, position = position_, status = status_, &