From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13977 invoked by alias); 11 Mar 2003 07:46: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 13956 invoked by uid 71); 11 Mar 2003 07:46:01 -0000 Resent-Date: 11 Mar 2003 07:46:01 -0000 Resent-Message-ID: <20030311074601.13955.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, tausq@debian.org Received: (qmail 12330 invoked from network); 11 Mar 2003 07:41:38 -0000 Received: from unknown (HELO pippin.tausq.org) (64.81.244.94) by 172.16.49.205 with SMTP; 11 Mar 2003 07:41:38 -0000 Received: by pippin.tausq.org (Postfix, from userid 1000) id C9FC3CD294; Mon, 10 Mar 2003 23:37:10 -0800 (PST) Message-Id: <20030311073710.GO11363@tausq.org> Date: Tue, 11 Mar 2003 07:46:00 -0000 From: tausq@debian.org Reply-To: tausq@debian.org To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org Cc: parisc-linux@lists.parisc-linux.org X-Send-Pr-Version: 3.113 Subject: optimization/10024: [3.3 regression; hppa-linux] ICE when optimizing inline code at -O2 X-SW-Source: 2003-03/txt/msg00533.txt.bz2 List-Id: >Number: 10024 >Category: optimization >Synopsis: [3.3 regression] inline optimization ICE >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Tue Mar 11 07:46:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Randolph Chung >Release: 3.3 20030309 (Debian prerelease) (Debian testing/unstable) >Organization: Debian >Environment: System: Linux gsyprf11.external.hp.com 2.4.20-pa18-UP #1 Sat Jan 4 22:06:52 PST 2003 parisc64 unknown unknown GNU/Linux Architecture: parisc64 host: hppa-unknown-linux-gnu build: hppa-unknown-linux-gnu target: hppa-unknown-linux-gnu configured with: ../src/configure -v --enable-languages=c,c++,f77,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-sjlj-exceptions --enable-clocale=gnu --enable-debug --enable-objc-gc hppa-linux >Description: see below; code works with gcc-3.2.3 This is extracted from allegro. It is similar but not the same as optimization/9768 >How-To-Repeat: gcc-3.3 -O2 -c bug.c --------------------8< bug.c 8<------------------- extern int * allegro_errno; typedef long fixed; extern inline int fixfloor (fixed x) { if (x >= 0) return (x >> 16); else return ~((~x) >> 16); } extern inline int fixtoi (fixed x) { return fixfloor(x) + ((x & 0x8000) >> 15); } extern inline fixed ftofix (double x) { if (x > 32767.0) { *allegro_errno = 34; return 0x7FFFFFFF; } if (x < -32767.0) { *allegro_errno = 34; return -0x7FFFFFFF; } return (long)(x * 65536.0 + (x < 0 ? -0.5 : 0.5)); } extern inline double fixtof (fixed x) { return (double)x / 65536.0; } extern inline fixed fixdiv (fixed x, fixed y) { if (y == 0) { *allegro_errno = 34; return (x < 0) ? -0x7FFFFFFF : 0x7FFFFFFF; } else return ftofix(fixtof(x) / fixtof(y)); } extern inline fixed itofix (int x) { return x << 16; } int foo(int n) { return fixtoi(fixdiv(itofix(512), itofix(n))); } --------------------8< bug.c 8<------------------- >Fix: unknown >Release-Note: >Audit-Trail: >Unformatted: