[Bug fortran/31563] Arithmetic overflow and BOZ
kargl at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Apr 13 19:44:00 GMT 2007
------- Comment #7 from kargl at gcc dot gnu dot org 2007-04-13 20:44 -------
(In reply to comment #6)
> Sorry, I cannot find another compiler that agrees with gfortran -
Then, I suggest you submit a bug report. The standard explicitly
says
"If a data-stmt-constant is a boz-literal-constant, the corresponding
variable shall be of type integer. The boz-literal-constant is treated
as if it were an int-literal-constant with a kind-param that specifies
the representation method with the largest decimal exponent range
supported by the processor."
Either integer(8) or integer(16) is the largest on your platform,
and the BOZ is converted as required by the standard. If you
want to compile your code and ignore the integer overflow, then
use -fno-range-check as others have already told you.
laptop:kargl[208] gfc4x -o z -fno-range-check h.f90
laptop:kargl[209] ./z
80000000
FF000000
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31563
More information about the Gcc-bugs
mailing list