From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4103 invoked by alias); 14 Aug 2002 11:36:02 -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 4034 invoked by uid 71); 14 Aug 2002 11:36:01 -0000 Resent-Date: 14 Aug 2002 11:36:01 -0000 Resent-Message-ID: <20020814113601.4032.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, Richard Zidlicky Received: (qmail 25148 invoked from network); 14 Aug 2002 11:30:57 -0000 Received: from unknown (HELO faui02.informatik.uni-erlangen.de) (131.188.30.102) by sources.redhat.com with SMTP; 14 Aug 2002 11:30:57 -0000 Received: from rz.de (root@faui02b.informatik.uni-erlangen.de [131.188.30.151]) by faui02.informatik.uni-erlangen.de (8.9.1/8.1.16-FAU) with ESMTP id NAA08775 for ; Wed, 14 Aug 2002 13:30:54 +0200 (MEST) Received: (from rz@localhost) by rz.de (8.8.8/8.8.8) id MAA00312; Wed, 14 Aug 2002 12:55:25 +0200 Message-Id: <200208141055.MAA00312@rz.de> Date: Wed, 14 Aug 2002 06:06:00 -0000 From: Richard Zidlicky To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: 3.113 Subject: c/7594: 3.1.1, 3.2 branch ICE on legal code X-SW-Source: 2002-08/txt/msg00281.txt.bz2 List-Id: >Number: 7594 >Category: c >Synopsis: ICE on legal code >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Wed Aug 14 04:36:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Richard Zidlicky >Release: 3.2 20020806 (prerelease) and 3.1.1 >Organization: >Environment: native and crosscompiled configured with: ../gcc-3.2-cvs/configure --enable-languages=c --disable-checking --with-newlib --without-headers --target=m68k-linux : (reconfigured) ../gcc-3.2-cvs/configure --enable-languages=c --disable-checking --with-newlib --without-headers --target=m68k-linux >Description: following testcase triggers ICE: #### compile with -O0 to trigger ICE #### extern void (**table)(void); typedef unsigned short uw16; typedef unsigned short uw16; typedef unsigned int gshort; register uw16 *pc asm("%a4"); register gshort code asm("%d6"); void QMExecuteLoop(uw16 *oldPC) { table[code=(*(uw16*)(pc++))](); } ######################################## Problem is caused by gen_lowpart() returning a REG instead of an SUBREG expression in certain cases. This is caused by some code in simplify_subreg around lines 2644 in simplify-rtx.c >How-To-Repeat: >Fix: Workaround for m68k-linux is to disable the code responsible for this simplification: --- gcc-3.2-cvs/gcc/simplify-rtx.c.rz Wed Mar 6 23:43:21 2002 +++ gcc-3.2-cvs/gcc/simplify-rtx.c Wed Aug 14 13:09:30 2002 @@ -2618,6 +2618,7 @@ suppress this simplification. If the hard register is the stack, frame, or argument pointer, leave this as a SUBREG. */ +#if 0 if (REG_P (op) && (! REG_FUNCTION_VALUE_P (op) || ! rtx_equal_function_value_matters) @@ -2662,6 +2663,7 @@ return x; } } +#endif /* If we have a SUBREG of a register that we are replacing and we are replacing it with a MEM, make a new MEM and try replacing the >Release-Note: >Audit-Trail: >Unformatted: