-
Notifications
You must be signed in to change notification settings - Fork 192
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
The following test will currently fail (tested with Intel Fortran):
subroutine test_string_i8(error)
use stdlib_kinds, only : i8 => int64
use stdlib_strings, only : to_string
!> Error handling
type(error_type), allocatable, intent(out) :: error
call check(error, to_string(-huge(1_i8) - 1_i8), "-9223372036854775808")
end subroutine test_string_i8
Fails due to abs
at
stdlib/src/stdlib_strings_to_string.fypp
Line 60 in f98f3d3
n = abs(value) |
Expected Behaviour
Correctly serialize -huge(1)-1
.
Version of stdlib
0.2.0, f98f3d3
Platform and Architecture
any
Additional Information
Found when adopting to_string
in TOML Fortran: toml-f/toml-f@d3ffce6
(#93)
Potential fix in fortran-lang/test-drive#21
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working