Compile of my sample source file t.c fails with the following output :- gcc -v t.c -o l Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs Configured with: ./configure : (reconfigured) ./configure : (reconfigured) ./configure Thread model: posix gcc version 3.2 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2/cc1 -lang-c -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ t.c -quiet -dumpbase t.c -version -o /tmp/cco63D8U.s GNU CPP version 3.2 (cpplib) (i386 Linux/ELF) GNU C version 3.2 (i686-pc-linux-gnu) compiled by GNU C version 3.2. ignoring nonexistent directory "NONE/include" ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2/include /usr/include End of search list. t.c: In function `main': t.c:11: warning: right shift count >= width of type t.c:4: warning: return type of `main' is not `int' t.c:15: unrecognizable insn: (insn 22 19 24 (set (reg:QI 60) (const_int 240 [0xf0])) -1 (nil) (nil)) t.c:15: Internal compiler error in extract_insn, at recog.c:2148 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. This same program compiles and runs OK on my Irix machine with this result :- dma = 0x20000000 shft = 0x2000 Release: gcc 3.2 Environment: RedHat Linux 7.3 (with XFS)
State-Changed-From-To: open->analyzed State-Changed-Why: Confirmed. The bug can be reproduced with the following code snippet: -------------------------snip here----------------------- void foo() { unsigned int i, j; j = (i >> 0xf0); } -------------------------snip here----------------------- Compiling this with gcc-3.2.1-prerelease (or mainline) on i686-pc-linux-gnu I get: PR8588.c: In function `foo': PR8588.c:4: warning: right shift count >= width of type PR8588.c:5: unrecognizable insn: (insn 10 20 12 (set (reg:QI 58) (const_int 240 [0xf0])) -1 (nil) (nil)) PR8588.c:5: Internal compiler error in extract_insn, at recog.c:2148 Please submit a full bug report, [etc.] The code compiled fine under gcc 3.0.x, therefore we have a regression.
Responsible-Changed-From-To: unassigned->ebotcazou Responsible-Changed-Why: Already toyed with something similar.
From: ebotcazou@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: c/8588 Date: 19 Nov 2002 20:13:21 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: ebotcazou@gcc.gnu.org 2002-11-19 12:13:21 Modified files: gcc : ChangeLog optabs.c Log message: 2002-11-19 Eric Botcazou <ebotcazou@libertysurf.fr> PR c/8588 * optabs.c (expand_binop): Convert CONST_INTs in shift operations too. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.15944&r2=1.15945 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/optabs.c.diff?cvsroot=gcc&r1=1.151&r2=1.152
State-Changed-From-To: analyzed->closed State-Changed-Why: Fixed.
From: ebotcazou@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: c/8588 Date: 23 Nov 2002 08:36:26 -0000 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_2-branch Changes by: ebotcazou@gcc.gnu.org 2002-11-23 00:36:25 Modified files: gcc : ChangeLog optabs.c Log message: PR c/8588 * optabs.c (expand_binop): Convert CONST_INTs in shift operations too. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.13152.2.657.2.146&r2=1.13152.2.657.2.147 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/optabs.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.124.2.2.4.2&r2=1.124.2.2.4.3