The following sample code: program testhexconstant
integer, parameter :: i4_ = Selected_Int_Kind( 9) ! works fine integer(i4_), parameter :: pos_nan_lower = z"7F800001" ! triggers an error integer(i4_), parameter :: pos_nan_lower = z"FF800001" end program testhexconstant triggers this error: gfortran -o testhex TestHex.F90 In file TestHex.F90:8 integer(i4_), parameter :: b = z"FF800001" 1 Error: Arithmetic overflow converting INTEGER(8) to INTEGER(4) at (1) for the gfortran version downloaded today (20061023) from http://quatramaran.ens.fr/~coudert/gfortran/gfortran-linux.tar.gz while the previous version that I had installed (dated 20060914) downloaded from the same place, just works fine with this code. This hex value should fit nicely anyway in a 4 byte integer, so I don't really understand what is happening here. regards, Jos de Kloe -- Summary: hexadecimal constant problem Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kloedej at knmi dot nl http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29561