This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

data type problems


Sorry for the number of bugs. I'm trying to add gfortran to our
build system and it looks like we have added code that's 
giving gfortran some problems. This application used to 
compile. :-)


        integer*4 iz4
        integer*4 io4
        data iz4 / z'80000000'/
        data io4 / o'20000000000'/
        write (*,*) iz4,io4
        end


The above program fails to compile with the errors:

b2.f90:4.26:

 data io4 / o'20000000000'/ 
                         1
Error: Arithmetic overflow converting INTEGER(16) to INTEGER(4) at (1)
b2.f90:3.23:

 data iz4 / z'80000000'/ 
                      1
Error: Arithmetic overflow converting INTEGER(16) to INTEGER(4) at (1)

-----

Fails with the compilers:

GNU Fortran 95 (GCC) 4.2.0 20061212 (prerelease)
GNU Fortran (GCC) 4.3.0 20070410 (experimental)
GNU Fortran 95 (GCC) 4.2.0 20070307 (prerelease)

Works with pgi, intel, OSF, Xlf.

Mike


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]