From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30126 invoked by alias); 1 Feb 2005 18:05:22 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 29965 invoked by uid 48); 1 Feb 2005 18:05:10 -0000 Date: Tue, 01 Feb 2005 18:05:00 -0000 From: "heikki dot orsila at iki dot fi" To: gcc-bugs@gcc.gnu.org Message-ID: <20050201180459.19743.heikki.orsila@iki.fi> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/19743] New: internal compiler error on errneous code X-Bugzilla-Reason: CC X-SW-Source: 2005-02/txt/msg00099.txt.bz2 List-Id: Following invalid C function gives internal compiler error on x86_64, but not on x86, on GCC 3.4.3 and 3.3.5: char blabla(unsigned int a) { return &((unsigned char *) &a)[0]; } 3.3.5 gives: $ ./gcc -Wall -O2 -c /test/char.c /test/char.c: In function `blabla': /test/char.c:3: warning: return makes integer from pointer without a cast /test/char.c:4: error: unrecognizable insn: (insn 29 11 13 0 (nil) (set (reg:SI 0 eax [62]) (subreg:SI (plus:DI (subreg:DI (reg:QI 7 spl) 0) (const_int -4 [0xfffffffffffffffc])) 0)) -1 (nil) (nil)) /test/char.c:4: internal compiler error: in extract_insn, at recog.c:2175 $ ./gcc -v Reading specs from /build/gcc/lib/gcc-lib/x86_64-unknown-linux-gnu/3.3.5/specs Configured with: ./configure --enable-languages=c --prefix=/build/gcc Thread model: posix gcc version 3.3.5 3.4.3 gives: $ ./gcc -Wall -O2 -c /test/char.c /test/char.c: In function `blabla': /test/char.c:3: warning: return makes integer from pointer without a cast /test/char.c:4: error: unrecognizable insn: (insn 30 11 13 0 (set (reg:SI 0 ax [62]) (subreg:SI (plus:DI (subreg:DI (reg:QI 7 sp) 0) (const_int -4 [0xfffffffffffffffc])) 0)) -1 (nil) (nil)) /test/char.c:4: internal compiler error: in extract_insn, at recog.c:2083 $ ./gcc -v Reading specs from /build/gcc/lib/gcc/x86_64-unknown-linux-gnu/3.4.3/specs Configured with: ./configure --enable-languages=c --prefix=/build/gcc Thread model: posix gcc version 3.4.3 -- Summary: internal compiler error on errneous code Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: heikki dot orsila at iki dot fi CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19743