This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH] fortran/arith.c -- Fix the range of integers in overflow checks
- From: howarth at bromo dot msbb dot uc dot edu (Jack Howarth)
- To: howarth at bromo dot msbb dot uc dot edu, sgk at troutmask dot apl dot washington dot edu
- Cc: fortran at gcc dot gnu dot org
- Date: Sun, 27 Aug 2006 20:30:37 -0400 (EDT)
- Subject: Re: [PATCH] fortran/arith.c -- Fix the range of integers in overflow checks
Steve,
For the test program...
program test
integer(16) i
i = 1
print *, i
end program test
...I get...
gfortran -O3 testint16.f90
In file testint16.f90:2
integer(16) i
1
Error: Kind 16 not supported for type INTEGER at (1)
...at the default -m32. However, at -m64, the test program
compiles and produces the output of 1. This matches the
behavior I see with gcc trunk's gfortran on Fedora Core 5
x86_64 linux.
Jack
ps Since I don't see the failure of intrinsic_set_exponent
at -m64 on Darwin PPC, I conclude we don't have the bug
on that arch.