------- Comment #4 from burnus at gcc dot gnu dot org 2007-01-22 08:47 ------- > For what it's worth, the Intel and Sun compilers have the behaviour you > expect, but the Portland compiler and g95 both have the same behaviour as > gfortran.
NAG f95 and pathscale 2.4 have: -128. > If I understand the standard correctly, -huge()-1, although being > representible by the hardware you have, is not "within the representation" > of this integer kind, because the range of the representation of an integer > kind is supposed to > be symmetric. Might be, but on the otherhand, if I have the following program: integer(1) :: a(2) a = -128 print *, maxval(a) I would expect that it prints "-128" and not "-127". -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30512