------- Comment #2 from burnus at gcc dot gnu dot org  2007-04-13 15:08 -------
Well, gfortran is right:
 x'80000000' = 2147483648 > 2147483647 = huge(msk1)
and
 o'37700000000' = 4278190080 > 2147483647 = huge(msk4)

Thus the BOZ numbers are too big for the 4-byte variables. The other compilers
simply allow the variable to overflow, which gfortran does if one uses the
option -fno-range-check. With that option the variables get initialized to:

  msk1 = -2147483648
  msk4 = -16777216

Therefore,
- If you don't want the overflows, check your program and use, e.g., 8-byte
variables
- If the overflows are on purpose, use the option  -fno-range-check

PS: I have a patch awaiting review which mentions the -fno-range-check option
in the error message.


-- 


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

Reply via email to