This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
data type problems
- From: Mike Kumbera <kumbera1 at llnl dot gov>
- To: fortran at gcc dot gnu dot org
- Date: Wed, 11 Apr 2007 15:41:40 -0700
- Subject: 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