Bug 11793 - [3.3 regression] ICE in extract_insn, at recog.c:2175 (const_vector's)
Summary: [3.3 regression] ICE in extract_insn, at recog.c:2175 (const_vector's)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.3.1
: P2 critical
Target Milestone: 3.3.3
Assignee: Aldy Hernandez
URL:
Keywords: ice-on-valid-code
: 12303 12785 12805 12878 12960 13436 13556 13619 13694 (view as bug list)
Depends on: 11983
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-04 17:57 UTC by Debian GCC Maintainers
Modified: 2004-11-19 18:49 UTC (History)
13 users (show)

See Also:
Host: powerpc-linux
Target: powerpc-*-*
Build: powerpc-linux
Known to work:
Known to fail:
Last reconfirmed: 2003-08-04 19:40:08


Attachments
preprocessed source (9.36 KB, application/octet-stream)
2003-08-04 17:57 UTC, Debian GCC Maintainers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Debian GCC Maintainers 2003-08-04 17:57:01 UTC
[forwarded from http://bugs.debian.org/203835]

A regression from 3.3 probably introduced between 20030722 and 20030728. Found
on HEAD CVS 20030531 as well (no newer version at hand).

gcc -O -maltivec -mabi=altivec -c n1fv_9.i
n1fv_9.c: In function `n1fv_9':
n1fv_9.c:128: error: unrecognizable insn:
(insn 2983 1654 1655 2 (nil) (set (reg:V4SF 77 v0)
        (const_vector:V4SF [
                (const_double:SF 9.3969261646270751953125e-1 [0x0.f08fb2p+0])
                (const_double:SF 9.3969261646270751953125e-1 [0x0.f08fb2p+0])
                (const_double:SF 9.3969261646270751953125e-1 [0x0.f08fb2p+0])
                (const_double:SF 9.3969261646270751953125e-1 [0x0.f08fb2p+0])
            ])) -1 (nil)
    (nil))
n1fv_9.c:128: internal compiler error: in extract_insn, at recog.c:2175

The file n1fv_9.i is attached.
Comment 1 Debian GCC Maintainers 2003-08-04 17:57:42 UTC
Created attachment 4560 [details]
preprocessed source
Comment 2 Andrew Pinski 2003-08-04 19:40:08 UTC
Fixed on the mainline by http://gcc.gnu.org/ml/gcc-patches/2003-06/msg02445.html.
Aldy would you mind asking for this to go into the 3.3 branch after the release of 3.3.1.
Comment 3 Andrew Pinski 2003-09-16 16:02:38 UTC
*** Bug 12303 has been marked as a duplicate of this bug. ***
Comment 4 David Stevenson 2003-09-23 17:11:15 UTC
I get the following similar error on i386 setup as cross compile to i386 
I assume it is the same bug, but if not I can submit more info. 
 
/home/david/smart/tools/uClibc/bin/i386-uclibc-gcc -I./include -Wall -Wstrict-prototypes 
-Wshadow -Os -march=i386 -mpreferred-stack-boundary=2 -falign-functions=0 -falign-jumps=0 
-falign-loops=0 -fomit-frame-pointer -D_GNU_SOURCE -DNDEBUG     -c -o libbb/dump.o 
libbb/dump.c 
libbb/dump.c: In function `rewrite': 
libbb/dump.c:307: error: unrecognizable insn: 
(insn:HI 1049 918 1050 33 0x402a6e70 (set (reg:CC 17 flags) 
        (compare:CC (const:SI (plus:SI (symbol_ref:SI ("lcc")) 
                    (const_int 1 [0x1]))) 
            (reg/f:SI 110))) -1 (nil) 
    (expr_list:REG_DEAD (reg/f:SI 110) 
        (nil))) 
libbb/dump.c:307: internal compiler error: in extract_insn, at recog.c:2175 
 
notebook:/home/david/smart/busybox-1.00-pre2 # gcc --ver 
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.3/specs 
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local 
--infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib 
--enable-languages=c,c++,f77,objc,java,ada --disable-checking --enable-libgcj 
--with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared 
--enable-__cxa_atexit i486-suse-linux 
Thread model: posix 
gcc version 3.3 20030226 (prerelease) (SuSE Linux) 
 
Comment 5 Debian GCC Maintainers 2003-09-29 20:58:23 UTC
according to Benjamin Herrenschmidt (http://bugs.debian.org/203835),
http://gcc.gnu.org/ml/gcc-patches/2003-06/msg02445.html does fix the ICE on the
mainline.
Comment 6 Debian GCC Maintainers 2003-10-13 20:06:13 UTC
There is a patch for 3.3 at: http://gcc.gnu.org/ml/gcc-patches/2003-08/msg01356.html
Comment 7 Mark Mitchell 2003-10-13 20:13:57 UTC
This patch is OK for GCC 3.3.2.
Comment 8 Debian GCC Maintainers 2003-10-13 21:25:18 UTC
committed.
Comment 9 Andrew Pinski 2003-10-13 21:34:03 UTC
This one is not fixed by the patch commited, that was a different bug.
The patch for this bug is in <http://gcc.gnu.org/ml/gcc-patches/2003-06/msg02445.html>.
Comment 10 Matthias Klose 2003-10-14 17:56:32 UTC
Subject: Re:  [3.3.1 regression] ICE in extract_insn, at recog.c:2175

pinskia at gcc dot gnu dot org writes:
> This one is not fixed by the patch commited, that was a different bug.
> The patch for this bug is in <http://gcc.gnu.org/ml/gcc-patches/2003-06/msg02445.html>.

this is not enough:

cc  -c   -g -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long   -DHAVE_CONFIG_H    -I. -I. -I../../src/gcc -I../../src/gcc/. -I../../src/gcc/config -I../../src/gcc/../include ../../src/gcc/calls.c -o calls.o
../../src/gcc/calls.c: In function `precompute_register_parameters':
../../src/gcc/calls.c:910: warning: implicit declaration of function `easy_vector_constant'
../../src/gcc/calls.c:911: error: syntax error before "args"
../../src/gcc/calls.c: In function `emit_library_call_value_1':
../../src/gcc/calls.c:3660: warning: function `easy_vector_constant' was previously declared within a block
../../src/gcc/calls.c:3661: error: syntax error before "addr"
../../src/gcc/calls.c:3714: warning: function `easy_vector_constant' was previously declared within a block
../../src/gcc/calls.c:3715: error: syntax error before "val"
make[4]: *** [calls.o] Error 1

Looks like part of this is needed:

2003-04-01  Aldy Hernandez  <aldyh@redhat.com>

	[...]
        * config/rs6000/rs6000.c: Remove prototype for
        easy_vector_constant.
        (easy_vector_constant): Add mode parameter.  Rewrite to handle
        more easy constants.
        (rs6000_emit_move): Pass mode to easy_vector_constant.
        Call emit_easy_vector_insn for SPE V2SI vector constant moves.
        (emit_easy_vector_insn): New.
        (easy_vector_same): New.
        (EASY_VECTOR_15): New macro.
        (EASY_VECTOR_15_ADD_SELF): New macro.
        (bdesc_2arg): Rename to xorv2si3.
        (easy_vector_constant_add_self): New.
        (input_operand): Allow vector constants.
Comment 11 Mark Mitchell 2003-10-16 09:25:36 UTC
Postponed until GCC 3.3.3.
Comment 12 Andrew Pinski 2003-10-27 03:20:20 UTC
*** Bug 12785 has been marked as a duplicate of this bug. ***
Comment 13 Andrew Pinski 2003-10-28 15:11:28 UTC
*** Bug 12805 has been marked as a duplicate of this bug. ***
Comment 14 Falk Hueffner 2003-11-02 19:04:51 UTC
*** Bug 12878 has been marked as a duplicate of this bug. ***
Comment 15 Andrew Pinski 2003-11-08 08:12:19 UTC
*** Bug 12960 has been marked as a duplicate of this bug. ***
Comment 16 Zack Weinberg 2003-12-02 00:40:52 UTC
Aldy, please submit a patch for 3.3.
Comment 17 Andrew Pinski 2003-12-19 01:19:10 UTC
*** Bug 13436 has been marked as a duplicate of this bug. ***
Comment 18 Andrew Pinski 2003-12-19 01:19:59 UTC
Aldy could you back port the fixes, this is one of the most reported bugs now.
Comment 19 Daniel Ruoso 2003-12-20 19:30:35 UTC
Hmmm.. this bug applies to 3.3.3 also, not only to 3.3.1 as described in the
bug... I got this error with gcc 3.3.3.
Comment 20 Andrew Pinski 2004-01-03 18:38:55 UTC
*** Bug 13556 has been marked as a duplicate of this bug. ***
Comment 21 Andrew Pinski 2004-01-08 23:20:34 UTC
*** Bug 13619 has been marked as a duplicate of this bug. ***
Comment 22 Gabriel Dos Reis 2004-01-14 08:18:52 UTC
(In reply to comment #16)
> Aldy, please submit a patch for 3.3.

Aldy, would you have a chance to submit a backport for 3.3.x?
Comment 23 Andrew Pinski 2004-01-15 05:05:10 UTC
*** Bug 13694 has been marked as a duplicate of this bug. ***
Comment 24 Segher Boessenkool 2004-01-15 16:31:37 UTC
This is a dup of 11092, which has not yet been fixed
on the 3.3 branch.  I verified the patch there works
fine, though.
Comment 25 Andriy Rysin 2004-01-15 20:00:30 UTC
I don't know if it's the same bug, but I just tried snapshot from gcc-3.4:
gcc -v
Reading specs from /usr/local/lib/gcc/powerpc-unknown-linux-gnu/3.4.0/specs
Configured with: ../gcc-3.4-20040114/configure --enable-altivec
Thread model: posix
gcc version 3.4.0 20040114 (experimental)

and got ICE compiling ffmpeg like this:

gcc -Wall  -maltivec -mabi=altivec -g -O3 -DHAVE_AV_CONFIG_H -I..
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o
ppc/idct_altivec.o ppc/idct_altivec.c
ppc/mpegvideo_altivec.c: In function `dct_quantize_altivec':
ppc/mpegvideo_altivec.c:165: internal compiler error: in
add_location_or_const_value_attribute, at dwarf2out.c:9513
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 26 Andrew Pinski 2004-01-15 20:04:46 UTC
Note the ICE in dwarf-2 for 3.4 is PR11983.
Comment 27 GCC Commits 2004-01-16 15:05:43 UTC
Subject: Bug 11793

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	hpenner@gcc.gnu.org	2004-01-16 15:05:37

Modified files:
	gcc            : ChangeLog 
	gcc/config/rs6000: rs6000.h 

Log message:
	PR target/11793
	* config/rs6000/rs6000.h (LEGITIMATE_CONSTANT_P): Handle
	vectors.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.884&r2=1.16114.2.885
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.237.2.8&r2=1.237.2.9

Comment 28 Andrew Pinski 2004-01-16 16:16:49 UTC
Fixed for 3.3.3.
Comment 29 Meg Kido-Doty 2004-02-25 22:33:59 UTC
I installed gcc-3.3.3 on Red Hat Enterprise Linux AS release 3 (Taroon)
Kernel 2.4.21-4.ELsmp on an x86_64, Opteron. But I still get this error: 

tmdiff.c: In function `ms_time_cmp':
tmdiff.c:248: error: unrecognizable insn:
(insn:HI 90 89 58 2 0x2a97a3f360 (set (reg/v:SI 64)
        (plus:SI (mult:SI (reg/v:SI 64)
                (const_int 2 [0x2]))
            (const_int -1 [0xffffffffffffffff]))) -1 (insn_list 89 (nil))
    (nil))
tmdiff.c:248: internal compiler error: in extract_insn, at recog.c:2175

[root@putopt1 gcc3.3.3]# gcc --version
gcc (GCC) 3.3.3
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@putopt1 gcc3.3.3]# gcc -v
Reading specs from /usr/local/lib/gcc-lib/x86_64-unknown-linux-gnu/3.3.3/specs
Configured with: /Meg/gcc-3.3.3/configure 
Thread model: posix
gcc version 3.3.3




Comment 30 oliver stieber 2004-11-19 18:49:44 UTC
Still getting error with 3.3.4 compiling glibc. 
r/tmp/portage/glibc-2.3.4.20041021/work/build-i686-pc-linux-gnu-nptl/math/s_logb 
.o 
) [2 S8 A64]))) -1 (nil) 
    (expr_list:REG_EQUAL (const_double:DF -2089430000 [0x8375d410] 
1.02703333676 
410069053019924467662349343299865723e+0 [0x0.8375d410a6db48p+1]) 
        (nil))) 
../sysdeps/ieee754/dbl-64/s_erf.c:303: internal compiler error: in 
extract_insn, 
 at recog.c:2175