public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30420]  New: IBCLR() fails to properly handle clearing the sign bit.
@ 2007-01-10  2:10 brooks at gcc dot gnu dot org
  2007-01-10  2:10 ` [Bug fortran/30420] " brooks at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: brooks at gcc dot gnu dot org @ 2007-01-10  2:10 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-02-16 15:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-10  2:10 [Bug fortran/30420] New: IBCLR() fails to properly handle clearing the sign bit brooks at gcc dot gnu dot org
2007-01-10  2:10 ` [Bug fortran/30420] " brooks at gcc dot gnu dot org
2007-01-10  5:46 ` brooks at gcc dot gnu dot org
2007-01-10  5:57 ` [Bug fortran/30420] [4.1 and 4.2] " brooks at gcc dot gnu dot org
2007-02-07  8:12 ` fxcoudert at gcc dot gnu dot org
2007-02-16 12:20 ` fxcoudert at gcc dot gnu dot org
2007-02-16 15:57 ` [Bug fortran/30420] [4.1 only] " fxcoudert at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).