From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17469 invoked by alias); 9 Jul 2002 15:36: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 17450 invoked by uid 71); 9 Jul 2002 15:36:00 -0000 Resent-Date: 9 Jul 2002 15:36:00 -0000 Resent-Message-ID: <20020709153600.17449.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, uli@suse.de Resent-Reply-To: gcc-gnats@gcc.gnu.org, aj@suse.de Received: (qmail 15738 invoked by uid 61); 9 Jul 2002 15:34:16 -0000 Message-Id: <20020709153416.15737.qmail@sources.redhat.com> Date: Tue, 09 Jul 2002 08:36:00 -0000 From: aj@suse.de Reply-To: aj@suse.de To: gcc-gnats@gcc.gnu.org Cc: uli@suse.de X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify: uli@suse.de Subject: middle-end/7245: ICE in find_reloads X-SW-Source: 2002-07/txt/msg00268.txt.bz2 List-Id: >Number: 7245 >Category: middle-end >Synopsis: ICE in find_reloads >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Jul 09 08:36:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: aj@suse.de >Release: GCC 3.1.1 CVS as of 2002-07-01 >Organization: >Environment: i686-linux-gnu with glibc 2.2.5 >Description: typedef struct m { int* c; } m; int mdph(m* s) { int v,j,r; for(;;){ v = (r>>-8); if(v==0) break; s->c[j]= v; } } generates an ICE: $ /opt/gcc/3.1-devel/bin/gcc -c h.c -O2 -v Reading specs from /opt/gcc/3.1-devel/lib/gcc-lib/i686-pc-linux-gnu/3.1.1/specs Configured with: /cvs/gcc-3_1-branch/configure --prefix=/opt/gcc/3.1-devel --enable-shared --enable-threads=posix --enable-clocale=gnu --disable-nls --enable-languages=c,c++,f77,java,objc,ada --enable-checking=misc,tree,rtl,gc --with-system-zlib Thread model: posix gcc version 3.1.1 20020701 (prerelease) /opt/gcc/3.1-devel/lib/gcc-lib/i686-pc-linux-gnu/3.1.1/cc1 -lang-c -v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=1 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ h.c -quiet -dumpbase h.c -O2 -version -o /tmp/cccOPrt7.s GNU CPP version 3.1.1 20020701 (prerelease) (cpplib) (i386 Linux/ELF) GNU C version 3.1.1 20020701 (prerelease) (i686-pc-linux-gnu) compiled by GNU C version 3.1.1 20020701 (prerelease). ignoring nonexistent directory "/opt/gcc/3.1-devel/i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /opt/gcc/3.1-devel/include /opt/gcc/3.1-devel/lib/gcc-lib/i686-pc-linux-gnu/3.1.1/include /usr/include End of search list. h.c: In function `mdph': h.c:9: warning: right shift count is negative h.c:13: unable to generate reloads for: (insn:QI 61 60 11 (parallel[ (set (reg:CCZ 17 flags) (compare:CCZ (ashiftrt:SI (reg/v:SI 0 eax [62]) (const_int -8 [0xfffffff8])) (const_int 0 [0x0]))) (set (reg/v:SI 1 edx [60]) (ashiftrt:SI (reg/v:SI 0 eax [62]) (const_int -8 [0xfffffff8]))) ] ) 434 {*ashrsi3_cmp} (nil) (expr_list:REG_DEAD (reg/v:SI 0 eax [62]) (nil))) h.c:13: Internal compiler error in find_reloads, at reload.c:3576 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The same error occurs in both GCC 3.1.1 CVS and GCC 3.2 CVS. This is a regression from GCC 2.95.3. >How-To-Repeat: Just compile the example code. note that according to ISO C (6.5.7 clause #4): The result of E1 >> E2 ... If E1 has a signed type and a negative value, the resulting value is implementation-defined. >Fix: >Release-Note: >Audit-Trail: >Unformatted: