diff options
author | Andrey Belevantsev <abel@gcc.gnu.org> | 2012-01-20 10:22:24 +0400 |
---|---|---|
committer | Andrey Belevantsev <abel@gcc.gnu.org> | 2012-01-20 10:22:24 +0400 |
commit | 229bfbcff33bdf293029dd4990b96eb77af2f55a (patch) | |
tree | bb65cfd4f121aa6987a4d05b2a5c8a06029f4d05 /gcc | |
parent | 28b0d0a01e0626164ab6d2a87a44fac98879db90 (diff) | |
download | gcc-229bfbcff33bdf293029dd4990b96eb77af2f55a.zip gcc-229bfbcff33bdf293029dd4990b96eb77af2f55a.tar.gz gcc-229bfbcff33bdf293029dd4990b96eb77af2f55a.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/function.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr51106-1.c | 14 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr51106-2.c | 14 |
5 files changed, 41 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1266cd5..b05a764 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/function.c b/gcc/function.c index fcb79f5..94e51f4 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9b81745..c1dd677 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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. diff --git a/gcc/testsuite/gcc.dg/torture/pr51106-1.c b/gcc/testsuite/gcc.dg/torture/pr51106-1.c new file mode 100644 index 0000000..10b3b68 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr51106-1.c @@ -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 } */ diff --git a/gcc/testsuite/gcc.dg/torture/pr51106-2.c b/gcc/testsuite/gcc.dg/torture/pr51106-2.c new file mode 100644 index 0000000..e69bf1b --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr51106-2.c @@ -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 } */ |