[Bug fortran/30420] New: IBCLR() fails to properly handle clearing the sign bit.
brooks at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Jan 10 02:10:00 GMT 2007
Consider the following program:
program ibclr_test
write(*,*) ibclr(-1_1, 7)
end
This gives an error of:
write(*,*) ibclr(-1_1, 7)
1
Error: Result of IBCLR overflows its kind at (1)
The problem is that in the mpz_t representation, -1_1 is represented as a
string of 1 bits, and then when the 7th bit is swapped, this remains a negative
number -- but one that's out of range.
--
Summary: IBCLR() fails to properly handle clearing the sign bit.
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: brooks at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30420
More information about the Gcc-bugs
mailing list