Bug 25568 - [4.2 regression] RTL checking bootstrap failure on i686-unknown-linux-gnu
Summary: [4.2 regression] RTL checking bootstrap failure on i686-unknown-linux-gnu
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: 4.2.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build, ice-checking, ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2005-12-26 15:53 UTC by Kaveh Ghazi
Modified: 2005-12-27 00:23 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-12-26 18:02:34


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kaveh Ghazi 2005-12-26 15:53:07 UTC
I'm getting an RTL checking bootstrap failure on i686-unknown-linux-gnu.  The bootstrap dies in stage2 like so:

/home/ghazi/tmpdisk/gcc-testing/42/build/./prev-gcc/xgcc -B/home/ghazi/tmpdisk/gcc-testing/42/build/./prev-gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"zlib\" -DVERSION=\"1.1.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_MEMCPY=1 -DHAVE_STRERROR=1 -DHAVE_UNISTD_H=1  -I. -I../../egcc-SVN20051225/zlib     -O2 -g -fomit-frame-pointer -c -o libz_a-deflate.o `test -f 'deflate.c' || echo '../../egcc-SVN20051225/zlib/'`deflate.c
../../egcc-SVN20051225/zlib/deflate.c: In function 'deflateInit2_':
../../egcc-SVN20051225/zlib/deflate.c:312: internal compiler error: RTL check: expected code 'const_int', have 'const_double' in simplify_shift_const_1, at combine.c:8923

This is a regression.
Comment 1 graham.stott 2005-12-26 15:58:27 UTC
Subject: Re:   New: [4.2 regression] RTL checking bootstrap
 failure on i686-unknown-linux-gnu

ghazi at gcc dot gnu dot org wrote:
> I'm getting an RTL checking bootstrap failure on i686-unknown-linux-gnu.  The
> bootstrap dies in stage2 like so:
> 
> /home/ghazi/tmpdisk/gcc-testing/42/build/./prev-gcc/xgcc
> -B/home/ghazi/tmpdisk/gcc-testing/42/build/./prev-gcc/
> -B/usr/local/i686-pc-linux-gnu/bin/ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
> -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\"
> -DPACKAGE=\"zlib\" -DVERSION=\"1.1.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
> -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
> -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1
> -DHAVE_MEMCPY=1 -DHAVE_STRERROR=1 -DHAVE_UNISTD_H=1  -I.
> -I../../egcc-SVN20051225/zlib     -O2 -g -fomit-frame-pointer -c -o
> libz_a-deflate.o `test -f 'deflate.c' || echo
> '../../egcc-SVN20051225/zlib/'`deflate.c
> ../../egcc-SVN20051225/zlib/deflate.c: In function 'deflateInit2_':
> ../../egcc-SVN20051225/zlib/deflate.c:312: internal compiler error: RTL check:
> expected code 'const_int', have 'const_double' in simplify_shift_const_1, at
> combine.c:8923
> 
> This is a regression.
> 
> 

The follow patch should fixit
Index: combine.c
===================================================================
--- combine.c   (revision 109050)
+++ combine.c   (working copy)
@@ -8919,6 +8919,7 @@
               && (new = simplify_const_binary_operation (ASHIFT, result_mode,
                                                          XEXP (varop, 1),
                                                          GEN_INT (count))) != 0
+             && GET_CODE (new) == CONST_INT
               && merge_outer_ops (&outer_op, &outer_const, PLUS,
                                   INTVAL (new), result_mode, &complement_p))
             {
@@ -8937,6 +8938,7 @@
               && (new = simplify_const_binary_operation (code, result_mode,
                                                          XEXP (varop, 1),
                                                          GEN_INT (count))) != 0
+             && GET_CODE (new) == CONST_INT
               && merge_outer_ops (&outer_op, &outer_const, XOR,
                                   INTVAL (new), result_mode, &complement_p))
             {


Comment 2 Kaveh Ghazi 2005-12-26 16:04:57 UTC
I did a successful rtl bootstrap (--enable-checking=yes,rtl) as recently as:
http://gcc.gnu.org/ml/gcc-testresults/2005-12/msg00388.html

So this is at most a few weeks old.
Comment 3 graham.stott 2005-12-26 16:11:24 UTC
Subject: Re:  [4.2 regression] RTL checking bootstrap
 failure on i686-unknown-linux-gnu

ghazi at gcc dot gnu dot org wrote:
> ------- Comment #2 from ghazi at gcc dot gnu dot org  2005-12-26 16:04 -------
> I did a successful rtl bootstrap (--enable-checking=yes,rtl) as recently as:
> http://gcc.gnu.org/ml/gcc-testresults/2005-12/msg00388.html
> 
> So this is at most a few weeks old.
> 
> 

It came in with Fridays update
Comment 4 Andrew Pinski 2005-12-26 18:02:34 UTC
Confirmed.
Comment 5 grahams 2005-12-26 18:58:59 UTC
Subject: Bug 25568

Author: grahams
Date: Mon Dec 26 18:58:56 2005
New Revision: 109064

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109064
Log:

       PR middle-end/25568
       * combine.c (simplify_shift_const_1 <case PLUS>):Fix enable-checking
       rtl bootstrap failure.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/combine.c

Comment 6 Andrew Pinski 2005-12-27 00:23:19 UTC
Fixed.