From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29035 invoked by alias); 4 Oct 2002 19:00:49 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 29028 invoked from network); 4 Oct 2002 19:00:48 -0000 Received: from unknown (HELO mx2.redhat.com) (12.150.115.133) by sources.redhat.com with SMTP; 4 Oct 2002 19:00:48 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id g94J0Xs27974 for ; Fri, 4 Oct 2002 15:00:33 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g94J0ll30488 for ; Fri, 4 Oct 2002 15:00:47 -0400 Received: from localhost.localdomain (frothingslosh.sfbay.redhat.com [172.16.24.27]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g94J0lw11761 for ; Fri, 4 Oct 2002 12:00:47 -0700 Received: (from rth@localhost) by localhost.localdomain (8.11.6/8.11.6) id g94J0gs16309 for gcc@gcc.gnu.org; Fri, 4 Oct 2002 12:00:42 -0700 X-Authentication-Warning: localhost.localdomain: rth set sender to rth@redhat.com using -f Date: Fri, 04 Oct 2002 12:45:00 -0000 From: Richard Henderson To: gcc@gcc.gnu.org Subject: Re: libgcc2 __fixsfdi Message-ID: <20021004190042.GD16257@redhat.com> Mail-Followup-To: Richard Henderson , gcc@gcc.gnu.org References: <20021005002244.H25369@bubble.sa.bigpond.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021005002244.H25369@bubble.sa.bigpond.net.au> User-Agent: Mutt/1.4i X-SW-Source: 2002-10/txt/msg00284.txt.bz2 On Sat, Oct 05, 2002 at 12:22:44AM +0930, Alan Modra wrote: > gcc's __fixsfdi function returns extremely surprising results for > floats that overflow the range of DWtype. The integer value > wraps rather than limiting to min/max values. Well, rather it crops to the unsigned max and then wraps. Surprisingly, while implementing the new real.c, I found that something in gcc relied on this. I forget what, exactly, but if you change real_to_integer (which returns a signed result) to crop to the maximum signed integer (rather than wrapping), you'll get some test suite failures. I hadn't been interested in understanding why at the time. But we should if we go making this sort of change, we should be consistent between runtime and compiletime, which means addressing this half-remembered failure. r~