This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/51106] [4.5/4.6/4.7 Regression] ICE in move_insn, at haifa-sched.c:2314
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 Jan 2012 09:43:16 +0000
- Subject: [Bug target/51106] [4.5/4.6/4.7 Regression] ICE in move_insn, at haifa-sched.c:2314
- Auto-submitted: auto-generated
- References: <bug-51106-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51106
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-19 09:43:16 UTC ---
Shorter testcase for gcc.c-torture/compile/ :
int
foo (int x)
{
asm goto ("" : : "i" (x) : : lab);
return 1;
lab:
return 0;
}
Yeah, I think delete_insn_and_edges is the right fix here. You might also add
into the testsuite:
int
bar (int x)
{
asm goto ("" : : "i" (x) : : lab);
__builtin_unreachable ();
lab:
return 0;
}
(fortunately at this point the bb ending with the asm goto still has a fallthru
successor, otherwise purge_dead_edges wouldn't work).