You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling stdlib using NAG Fortran compiler 7.0 for Windows on Windows 10, it terminates compiling with the error "Integer (KIND=3) overflow" (KIND=3 corresponds to int32 in NAG Fortran).
Errors are detected in to_bytes_i4 in stdlib_io_npy_save.fypp and in get_descriptor in stdlib_io_npy_load.fypp .
In the procedures, the integer literal 2**32 is used in expressions as below:
I guess that 2**24 is probably correct instead of 2**32.
I have understood that to_bytes_i4 converts an integer to a byte string by converting a 32 bit decimal integer to a base-256 number and then to four ASCII characters.
In this case, the power of base number (=256) at each position are (256**0, 256**1, 256**2, 256**3), corresponding to (2**0, 2**8, 2**16, 2**24).
This consideration does not cover negative integers, but if my understanding is correct, the concerning expressions can be modified as follows:
When compiling stdlib using NAG Fortran compiler 7.0 for Windows on Windows 10, it terminates compiling with the error "Integer (KIND=3) overflow" (KIND=3 corresponds to int32 in NAG Fortran).
Errors are detected in
to_bytes_i4
in stdlib_io_npy_save.fypp and inget_descriptor
in stdlib_io_npy_load.fypp .In the procedures, the integer literal
2**32
is used in expressions as below:stdlib/src/stdlib_io_npy_save.fypp
Lines 63 to 66 in 8eaa778
stdlib/src/stdlib_io_npy_load.fypp
Lines 135 to 143 in 8eaa778
I guess that
2**24
is probably correct instead of2**32
.I have understood that
to_bytes_i4
converts an integer to a byte string by converting a 32 bit decimal integer to a base-256 number and then to four ASCII characters.In this case, the power of base number (=256) at each position are (
256**0
,256**1
,256**2
,256**3
), corresponding to (2**0
,2**8
,2**16
,2**24
).This consideration does not cover negative integers, but if my understanding is correct, the concerning expressions can be modified as follows:
and
If using
2**32
is a trick to handle negative integers, I need another solution to compile stdlib using NAG Fortran compiler.The text was updated successfully, but these errors were encountered: