Bug 55204 - [4.8 Regression] ICE: in extract_insn, at recog.c:2140 (unrecognizable insn) with -O --param loop-invariant-max-bbs-in-loop=0
Summary: [4.8 Regression] ICE: in extract_insn, at recog.c:2140 (unrecognizable insn) ...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: 4.8.0
Assignee: Richard Sandiford
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2012-11-04 12:14 UTC by Zdenek Sojka
Modified: 2012-11-05 18:59 UTC (History)
1 user (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work: 4.7.3
Known to fail: 4.8.0
Last reconfirmed: 2012-11-04 00:00:00


Attachments
reduced testcase (182 bytes, text/x-csrc)
2012-11-04 12:14 UTC, Zdenek Sojka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2012-11-04 12:14:21 UTC
Created attachment 28610 [details]
reduced testcase

Compiler output:
$ gcc -O --param loop-invariant-max-bbs-in-loop=0 testcase.ctestcase.c: In function 'f1':
testcase.c:18:1: error: unrecognizable insn:
 }
 ^
(insn 53 50 24 5 (set (reg:SI 5 di [77])
        (plus:SI (subreg:SI (reg:HI 7 sp) 0)
            (const_int -248 [0xffffffffffffff08]))) testcase.c:13 -1
     (nil))
testcase.c:18:1: internal compiler error: in extract_insn, at recog.c:2140
0x9969ea _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
        /mnt/svn/gcc-trunk/gcc/rtl-error.c:110
0x996a7a _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        /mnt/svn/gcc-trunk/gcc/rtl-error.c:118
0x9524d8 extract_insn(rtx_def*)
        /mnt/svn/gcc-trunk/gcc/recog.c:2140
0x9526eb extract_insn_cached(rtx_def*)
        /mnt/svn/gcc-trunk/gcc/recog.c:2043
0x79f91d cleanup_subreg_operands(rtx_def*)
        /mnt/svn/gcc-trunk/gcc/final.c:2968
0x94dc60 split_insn
        /mnt/svn/gcc-trunk/gcc/recog.c:2857
0x956401 split_all_insns()
        /mnt/svn/gcc-trunk/gcc/recog.c:2911
0x956558 rest_of_handle_split_after_reload
        /mnt/svn/gcc-trunk/gcc/recog.c:3795
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r193125 - crash
r192654 - OK
r191586 - OK
4.7 r191640 - OK
Comment 1 Marek Polacek 2012-11-04 13:18:17 UTC
Started with http://gcc.gnu.org/viewcvs?view=revision&revision=192988
Comment 2 Uroš Bizjak 2012-11-05 09:21:57 UTC
Does the patch at [1] fix also this failure?

[1] http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00353.html
Comment 3 Richard Sandiford 2012-11-05 18:51:40 UTC
Author: rsandifo
Date: Mon Nov  5 18:51:33 2012
New Revision: 193178

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193178
Log:
gcc/
	PR target/55204
	* config/i386/i386.c (ix86_address_subreg_operand): Remove stack
	pointer check.
	(print_reg): Use true_regnum rather than REGNO.
	(ix86_print_operand_address): Remove SUBREG handling.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
Comment 4 Richard Sandiford 2012-11-05 18:55:38 UTC
Author: rsandifo
Date: Mon Nov  5 18:55:35 2012
New Revision: 193179

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193179
Log:
gcc/
	PR target/55204
	* config/i386/i386.c (ix86_address_subreg_operand): Remove stack
	pointer check.
	(print_reg): Use true_regnum rather than REGNO.
	(ix86_print_operand_address): Remove SUBREG handling.

Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/config/i386/i386.c
Comment 5 Richard Sandiford 2012-11-05 18:59:12 UTC
Patch applied.