[Bug fortran/31563] Arithmetic overflow and BOZ

2007-04-13 Thread fxcoudert at gcc dot gnu dot org
--- Comment #1 from fxcoudert at gcc dot gnu dot org 2007-04-13 15:02 --- The code you report is invalid, and gfortran is right to throw an error. If you really want it to compile, please use -fno-range-check. (see http://gcc.gnu.org/ml/fortran/2007-04/msg00123.html for details and a

[Bug fortran/31563] Arithmetic overflow and BOZ

2007-04-13 Thread burnus at gcc dot gnu dot org
--- Comment #2 from burnus at gcc dot gnu dot org 2007-04-13 15:08 --- Well, gfortran is right: x'8000' = 2147483648 2147483647 = huge(msk1) and o'377' = 4278190080 2147483647 = huge(msk4) Thus the BOZ numbers are too big for the 4-byte variables. The other compilers

[Bug fortran/31563] Arithmetic overflow and BOZ

2007-04-13 Thread dir at lanl dot gov
--- Comment #3 from dir at lanl dot gov 2007-04-13 15:28 --- I do not see why you say the numbers over flow - g95 gives exactly the correct answer when I print them out [dranta:~/junk] dir% g95 -o mask mask.f90 [dranta:~/junk] dir% mask 8000 FF00 [dranta:~/junk] dir% cat

[Bug fortran/31563] Arithmetic overflow and BOZ

2007-04-13 Thread dir at lanl dot gov
--- Comment #4 from dir at lanl dot gov 2007-04-13 15:52 --- With Hex and octal numbers - there is no overflow as long as there are enough bits - that is why g95 and Absoft do not complain. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31563

[Bug fortran/31563] Arithmetic overflow and BOZ

2007-04-13 Thread kargl at gcc dot gnu dot org
--- Comment #5 from kargl at gcc dot gnu dot org 2007-04-13 18:38 --- (In reply to comment #4) With Hex and octal numbers - there is no overflow as long as there are enough bits - that is why g95 and Absoft do not complain. g95 and absoft do not complain because these compilers

[Bug fortran/31563] Arithmetic overflow and BOZ

2007-04-13 Thread dir at lanl dot gov
--- Comment #6 from dir at lanl dot gov 2007-04-13 20:32 --- Sorry, I cannot find another compiler that agrees with gfortran - [EMAIL PROTECTED] ~/tests]$ ifort -o mask mask.f90 [EMAIL PROTECTED] ~/tests]$ mask 8000 FF00 qsc10:~/tests [6] f90 -o mask mask.f90 qsc10:~/tests [7]

[Bug fortran/31563] Arithmetic overflow and BOZ

2007-04-13 Thread kargl at gcc dot gnu dot org
--- 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