Note that -huge(i) will not return the smallest possible integer:
print*, -huge(1) ! -> -2147483647
print*, -huge(1)-1 ! -> -2147483648
print*, -huge(1)-2 ! -> Error: Arithmetic overflow
Note that -huge(i) will not return the smallest possible integer:
print*, -huge(1) ! -> -2147483647
print*, -huge(1)-1 ! -> -2147483648
print*, -huge(1)-2 ! -> Error: Arithmetic overflow