http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57148



kargl at gcc dot gnu.org changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |kargl at gcc dot gnu.org



--- Comment #2 from kargl at gcc dot gnu.org 2013-05-02 20:02:58 UTC ---

(In reply to comment #1)

> You are wrong in saying the range is -2147483648 to +2147483647.  In fortran

> the range is symmetrical around 0.

> 

> *** This bug has been marked as a duplicate of bug 33285 ***



Not quite right.  The model numbers imply a symmetric range.

It is processor dependent on whether the most negative

value is -2147483648.  Without see the source, it's difficult

to say what OP hit. If her/his code is equivalent to



program foo

  integer i

  read(*,*) i

  print *, i

end program foo



update to 4.8. or trunk.  



This is trunk.

% gfc4x -o foo foo.f90

% ./foo

-2147483648 

 -2147483648



This is 4.7.something_revision.

gfc47 -o foo foo.f90

troutmask:sgk[214] ./foo

-2147483648 

At line 3 of file foo.f90 (unit = 5, file = 'stdin')

Fortran runtime error: Integer overflow while reading item 1



If OP tries a simple assignment he/she will hit an issue

with a unary minus operator.

Reply via email to