From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19796 invoked by alias); 9 Jul 2002 22:56:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 19781 invoked by uid 71); 9 Jul 2002 22:56:01 -0000 Date: Tue, 09 Jul 2002 15:56:00 -0000 Message-ID: <20020709225601.19780.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Jeff Law Subject: Re: target/7250: __ashrdi3 returns wrong value on 32 bit hppa Reply-To: Jeff Law X-SW-Source: 2002-07/txt/msg00281.txt.bz2 List-Id: The following reply was made to PR target/7250; it has been noted by GNATS. From: Jeff Law To: sje@cup.hp.com Cc: gcc-gnats@gcc.gnu.org Subject: Re: target/7250: __ashrdi3 returns wrong value on 32 bit hppa Date: Tue, 09 Jul 2002 16:48:46 -0600 In message <20020709203142.10159.qmail@sources.redhat.com>, sje@cup.hp.com writ es: > >>Number: 7250 >>Category: target >>Synopsis: __ashrdi3 returns wrong value on 32 bit hppa >>Confidential: no >>Severity: serious >>Priority: medium >>Responsible: unassigned >>State: open >>Class: sw-bug >>Submitter-Id: net >>Arrival-Date: Tue Jul 09 13:36:01 PDT 2002 >>Closed-Date: >>Last-Modified: >>Originator: sje@cup.hp.com >>Release: 3.0.2 >>Organization: >>Environment: >hppa1.1-hp-hpux11.00 >>Description: >Arithmatic right shift of long long (64 bit) value returns wrong value. See >attached file (x.c) for a program that >fails with -O0 (with call to __ashrdi3) but works with optimization because t >he call is optimized away. > >>How-To-Repeat: >Compile x.c and run it *without* optimization on a 32 bit PA machine. With o >ptimization it works. Can you look a little deeper into this? It seems quite odd that ashrdi3 would return the wrong value for a shift count of zero as it special cases zero count in libgcc2.c: DWtype __ashrdi3 (DWtype u, word_type b) { DWunion w; word_type bm; DWunion uu; if (b == 0) return u; [ ... ] Jeff