re PR target/51106 (ICE in move_insn, at haifa-sched.c:2314)

gcc:/
2012-01-20  Andrey Belevantsev  <abel@ispras.ru>

      PR target/51106
      * function.c (instantiate_virtual_regs_in_insn): Use
      delete_insn_and_edges when removing a wrong asm insn.

testsuite:/
2012-01-20  Jakub Jelinek  <jakub@redhat.com>

      PR target/51106
      * gcc.dg/torture/pr51106-1.c: New test.
      * gcc.dg/torture/pr51106-2.c: New test.

From-SVN: r183325
This commit is contained in:
Andrey Belevantsev 2012-01-20 10:22:24 +04:00
parent 28b0d0a01e
commit 229bfbcff3
5 changed files with 41 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2012-01-20 Andrey Belevantsev <abel@ispras.ru>
PR target/51106
* function.c (instantiate_virtual_regs_in_insn): Use
delete_insn_and_edges when removing a wrong asm insn.
2012-01-19 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/40761

View File

@ -1737,7 +1737,7 @@ instantiate_virtual_regs_in_insn (rtx insn)
if (!check_asm_operands (PATTERN (insn)))
{
error_for_asm (insn, "impossible constraint in %<asm%>");
delete_insn (insn);
delete_insn_and_edges (insn);
}
}
else

View File

@ -1,3 +1,9 @@
2012-01-20 Jakub Jelinek <jakub@redhat.com>
PR target/51106
* gcc.dg/torture/pr51106-1.c: New test.
* gcc.dg/torture/pr51106-2.c: New test.
2012-01-19 Kai Tietz <ktietz@redhat.com>
* g++.dg/torture/pr51344.C: New test.

View File

@ -0,0 +1,14 @@
/* PR target/51106 */
/* { dg-do "compile" } */
/* { dg-skip-if "RTL error" { "*-*-*" } { "-fno-fat-lto-objects" } { "" } } */
int
foo (int x)
{
asm goto ("" : : "i" (x) : : lab); /* { dg-error "impossible constraint" } */
return 1;
lab:
return 0;
}
/* { dg-warning "probably doesn.t match constraints" "" { target *-*-* } 8 } */

View File

@ -0,0 +1,14 @@
/* PR target/51106 */
/* { dg-do "compile" } */
/* { dg-skip-if "RTL error" { "*-*-*" } { "-fno-fat-lto-objects" } { "" } } */
int
bar (int x)
{
asm goto ("" : : "i" (x) : : lab); /* { dg-error "impossible constraint" } */
__builtin_unreachable ();
lab:
return 0;
}
/* { dg-warning "probably doesn.t match constraints" "" { target *-*-* } 8 } */