INTEGER*4 :: MASK1 = Z'FFFFFFFF' PRINT *,MASK1 END compiles and produces "-1" with g77 (as it should) while gfortran reports In file err.f:1 INTEGER*4 :: MASK1 = Z'FFFFFFFF' 1 Error: Arithmetic overflow converting INTEGER(8) to INTEGER(4) at (1) Olav
Gfortran is doing the correct thing for BOZs. This is a dup of bug 24828. *** This bug has been marked as a duplicate of 24828 ***
Try -fno-range-check or use standard conforming methods.
Subject: Re: integer assignment in hexadecimal fails On 14 nov 2006, at 02.23, jvdelisle at gcc dot gnu dot org wrote: > Try -fno-range-check or use standard conforming methods. Thank you, this was a learning experience indeed. /Olav