This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/58670] asm goto miscompilation
- 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: Wed, 09 Oct 2013 19:21:57 +0000
- Subject: [Bug middle-end/58670] asm goto miscompilation
- Auto-submitted: auto-generated
- References: <bug-58670-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I see multiple issues:
1) commit_one_edge_insertion doesn't seem to cope with asm goto,
I think asm goto with only labels pointing to the fallthru bb's labels
can happen both for the single_pred_p (e->dest) case, as well as the
single_succ_p case. JUMP_P in that case would be true, but we certainly
can't insert in that case before the jump (aka asm goto).
2) during expansion, we apparently emit some further insns (some noop pseudo
copy and unconditional jump) directly after asm goto into the same bb, then
commit these edge insertions (so commit_one_edge_insertion actually doesn't
see the asm goto at the end of the bb, but an unconditional jump) and only
later on split the bb in find_many_sub_basic_blocks.