public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner)
To: law@redhat.com
Cc: dewar@gnat.com, gcc@gcc.gnu.org
Subject: Re: Bootstrap failure on trunk: x86_64-linux-gnu
Date: Wed, 01 Mar 2006 03:01:00 -0000	[thread overview]
Message-ID: <10603010308.AA08060@vlsi1.ultra.nyu.edu> (raw)

    We have a loop with the following termination code in uintp.num_bits

This sure looks like a bug in Num_Bits to me, not in the compilation
of the front-end.

The relevant code is:

   function Num_Bits (Input : Uint) return Nat is
      Bits : Nat;
      Num  : Nat;

   begin
      if UI_Is_In_Int_Range (Input) then
         Num := abs (UI_To_Int (Input));
         Bits := 0;

This code only works for one-complement machines, since it assumes a
symmetric range for Int.  It breaks when UI_To_Int returns Integer'First, as
it did in this case.  When it does, the abs produces an erroneous result
(since checking is disabled).  So it almost doesn't matter what it puts into
Num (but it actually puts in an out-of-range value there too).

Robert, what's the proper fix here?

             reply	other threads:[~2006-03-01  3:01 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-01  3:01 Richard Kenner [this message]
2006-03-03  8:08 ` Duncan Sands
  -- strict thread matches above, loose matches on Subject: below --
2006-03-02 19:09 Richard Kenner
2006-03-01 13:17 Richard Kenner
2006-03-01 21:16 ` Jeffrey A Law
2006-03-01 13:10 Richard Kenner
2006-03-01  2:02 Richard Kenner
2006-03-01  2:00 Richard Kenner
2006-02-19 19:17 Richard Kenner
2006-02-19 17:08 Andrew Haley
2006-02-19 17:11 ` Andrew Pinski
2006-02-19 17:14   ` Arnaud Charlet
2006-02-19 19:13     ` Eric Botcazou
2006-02-21 17:35       ` Jeffrey A Law
2006-02-21 22:56         ` Mark Mitchell
2006-02-22 10:51           ` Richard Guenther
2006-02-22 16:31             ` Jeffrey A Law
2006-02-22 16:40           ` Jeffrey A Law
2006-02-22 17:00             ` Mark Mitchell
2006-02-22 17:07               ` Jeffrey A Law
2006-02-23 21:25                 ` Richard Henderson
2006-02-28 11:04         ` Eric Botcazou
2006-02-28 16:48           ` Jeffrey A Law
2006-02-28 17:40             ` Eric Botcazou
2006-02-28 22:43               ` Jeffrey A Law
2006-02-28 23:59                 ` Daniel Jacobowitz
2006-03-01 12:08                   ` Laurent GUERBY
2006-03-01 22:35                     ` Jeffrey A Law
2006-03-02 13:03                       ` Eric Botcazou
2006-03-02 13:29                         ` Eric Botcazou
2006-03-02 19:07                         ` Jeffrey A Law
2006-03-02 19:12                           ` Eric Botcazou
2006-03-01 10:29                 ` Sebastian Pop
2006-02-28 16:57           ` Diego Novillo
2006-02-28 17:12             ` Richard Guenther
2006-02-28 17:48             ` Eric Botcazou
2006-02-28 22:43               ` Jeffrey A Law
2006-02-28 22:51                 ` Diego Novillo
2006-02-28 23:21                   ` Jeffrey A Law
2006-02-19 17:35   ` Andrew Haley
2006-02-19 17:20 ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10603010308.AA08060@vlsi1.ultra.nyu.edu \
    --to=kenner@vlsi1.ultra.nyu.edu \
    --cc=dewar@gnat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=law@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).