public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "danglin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/49723] gcc.c-torture/compile/pr46934.c: ICE in do_SUBST, at combine.c:707 at -O1 and above
Date: Wed, 13 Jul 2011 01:10:00 -0000	[thread overview]
Message-ID: <bug-49723-4-ki4tFQN6QZ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-49723-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49723

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org

--- Comment #2 from John David Anglin <danglin at gcc dot gnu.org> 2011-07-13 01:09:39 UTC ---
(gdb) bt
#0  do_SUBST (into=0x417aa1e8, newval=0x4170cfb4) at
../../gcc/gcc/combine.c:706
#1  0x0029981a in subst (x=0x417aa1e0, from=0x417a52a0, to=0x4170cfb4,
in_dest=0, in_cond=0, unique_copy=0) at ../../gcc/gcc/combine.c:5227
#2  0x002996b7 in subst (x=0x41712ed0, from=0x417a52a0, to=0x4170cfb4,
in_dest=0, in_cond=0, unique_copy=0) at ../../gcc/gcc/combine.c:5189
#3  0x00292c99 in try_combine (i3=0x4176a84c, i2=0x4176a828, i1=0x0, i0=0x0,
new_direct_jump_p=0xbffff034, last_combined_insn=0x4176a84c) at
../../gcc/gcc/combine.c:3178
#4  0x0028cb6d in combine_instructions (f=0x417135c0, nregs=81) at
../../gcc/gcc/combine.c:1223
#5  0x002b1eb8 in rest_of_handle_combine () at ../../gcc/gcc/combine.c:13878
#6  0x0070bfda in execute_one_pass (pass=0xcf3360) at
../../gcc/gcc/passes.c:2063
#7  0x0070c477 in execute_pass_list (pass=0xcf3360) at
../../gcc/gcc/passes.c:2118
#8  0x0070c493 in execute_pass_list (pass=0xd44320) at
../../gcc/gcc/passes.c:2119
#9  0x0090a5ee in tree_rest_of_compilation (fndecl=0x41785300) at
../../gcc/gcc/tree-optimize.c:416
#10 0x00289022 in cgraph_expand_function (node=0x4178d000) at
../../gcc/gcc/cgraphunit.c:1804
#11 0x00289202 in cgraph_expand_all_functions () at
../../gcc/gcc/cgraphunit.c:1863
#12 0x00289a4a in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:2133
#13 0x002860d9 in cgraph_finalize_compilation_unit () at
../../gcc/gcc/cgraphunit.c:1304
#14 0x00038838 in c_write_global_declarations () at ../../gcc/gcc/c-decl.c:9844
#15 0x00830b46 in compile_file () at ../../gcc/gcc/toplev.c:564
#16 0x0083375f in do_compile () at ../../gcc/gcc/toplev.c:1886
#17 0x00833940 in toplev_main (argc=13, argv=0xbffff400) at
../../gcc/gcc/toplev.c:1958
#18 0x00149e0f in main (argc=13, argv=0xbffff400) at ../../gcc/gcc/main.c:36

(gdb) p debug_rtx (i3)
(insn 9 8 10 2 (set (reg:SI 73)
        (minus:SI (reg:SI 26 %r26 [ reg_type ])
            (reg:SI 74)))
/test/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr46934.c:3 168
{*pa.md:5239}
     (expr_list:REG_DEAD (reg:SI 26 %r26 [ reg_type ])
        (expr_list:REG_DEAD (reg:SI 74)
            (nil))))
$4 = void
(gdb) p debug_rtx (i2)
(insn 8 7 9 2 (set (reg:SI 74)
        (const_int 2147483648 [0x80000000]))
/test/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr46934.c:3 71
{*pa.md:2130}
     (nil))
$5 = void

This is how insn 8 is generated:

(gdb) bt
#0  emit_move_sequence (operands=0xbfffe904, mode=SImode, scratch_reg=0x0) at
../../gcc/gcc/config/pa/pa.c:1541
#1  0x00171709 in gen_movsi (operand0=0x417a52a0, operand1=0x4170cfb4) at
pa.md:2048
#2  0x003a97e6 in emit_move_insn_1 (x=0x417a52a0, y=0x4170cfb4) at
../../gcc/gcc/expr.c:3280
#3  0x003a9c63 in emit_move_insn (x=0x417a52a0, y=0x4170cfb4) at
../../gcc/gcc/expr.c:3370
#4  0x00388537 in force_reg (mode=SImode, x=0x4170cfb4) at
../../gcc/gcc/explow.c:671
#5  0x00178945 in gen_casesi (operand0=0x41712e94, operand1=0x41712ea0,
operand2=0x4170c36c, operand3=0x4176a7e0, operand4=0x4176a72c) at pa.md:6918
#6  0x006fc425 in maybe_gen_insn (icode=CODE_FOR_casesi, nops=5,
ops=0xbfffebb0) at ../../gcc/gcc/optabs.c:7259
#7  0x006fc533 in maybe_expand_jump_insn (icode=CODE_FOR_casesi, nops=5,
ops=0xbfffebb0) at ../../gcc/gcc/optabs.c:7290
#8  0x006fc5cb in expand_jump_insn (icode=CODE_FOR_casesi, nops=5,
ops=0xbfffebb0) at ../../gcc/gcc/optabs.c:7316
#9  0x003dbe85 in try_casesi (index_type=0x417153c0, index_expr=0x411e8554,
minval=0x4172101c, range=0x4178ad3c, table_label=0x4176a7e0,
default_label=0x4176a72c, fallback_label=0x4176a750) at
../../gcc/gcc/expr.c:10152
#10 0x00814841 in expand_case (stmt=0x417a6000) at ../../gcc/gcc/stmt.c:2505
#11 0x0024c13d in expand_gimple_stmt_1 (stmt=0x417a6000) at
../../gcc/gcc/cfgexpand.c:1918
#12 0x0024ca1d in expand_gimple_stmt (stmt=0x417a6000) at
../../gcc/gcc/cfgexpand.c:2071
#13 0x00258312 in expand_gimple_basic_block (bb=0x417a7080) at
../../gcc/gcc/cfgexpand.c:3805
#14 0x0025b646 in gimple_expand_cfg () at ../../gcc/gcc/cfgexpand.c:4288
#15 0x0070bfda in execute_one_pass (pass=0xcf2f60) at
../../gcc/gcc/passes.c:2063
#16 0x0070c477 in execute_pass_list (pass=0xcf2f60) at
../../gcc/gcc/passes.c:2118
#17 0x0090a5ee in tree_rest_of_compilation (fndecl=0x41785300) at
../../gcc/gcc/tree-optimize.c:416
#18 0x00289022 in cgraph_expand_function (node=0x4178d000) at
../../gcc/gcc/cgraphunit.c:1804
#19 0x00289202 in cgraph_expand_all_functions () at
../../gcc/gcc/cgraphunit.c:1863
#20 0x00289a4a in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:2133
#21 0x002860d9 in cgraph_finalize_compilation_unit () at
../../gcc/gcc/cgraphunit.c:1304
#22 0x00038838 in c_write_global_declarations () at ../../gcc/gcc/c-decl.c:9844
#23 0x00830b46 in compile_file () at ../../gcc/gcc/toplev.c:564
#24 0x0083375f in do_compile () at ../../gcc/gcc/toplev.c:1886
#25 0x00833940 in toplev_main (argc=13, argv=0xbffff400) at
../../gcc/gcc/toplev.c:1958
#26 0x00149e0f in main (argc=13, argv=0xbffff400) at ../../gcc/gcc/main.c:36

(gdb) p debug_rtx (operands[1])
(const_int 2147483648 [0x80000000])
$15 = void

The problem would be avoid if the const_int was sign extended to
HOST_WIDE_INT, but who's supposed to do it?


  parent reply	other threads:[~2011-07-13  1:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-12 23:17 [Bug middle-end/49723] New: " danglin at gcc dot gnu.org
2011-07-13  0:20 ` [Bug middle-end/49723] " danglin at gcc dot gnu.org
2011-07-13  1:10 ` danglin at gcc dot gnu.org [this message]
2011-07-13  8:24 ` rguenth at gcc dot gnu.org
2011-07-13 10:35 ` ebotcazou at gcc dot gnu.org
2011-07-13 10:49 ` ebotcazou at gcc dot gnu.org
2011-07-13 15:26 ` [Bug target/49723] " danglin at gcc dot gnu.org
2011-07-15 18:12 ` danglin at gcc dot gnu.org
2011-07-15 18:13 ` danglin at gcc dot gnu.org
2011-07-15 18:15 ` danglin at gcc dot gnu.org
2011-07-16 18:34 ` danglin at gcc dot gnu.org
2011-07-16 18:40 ` danglin at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-49723-4-ki4tFQN6QZ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).