This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/44469] [4.5/4.6 Regression] internal compiler error: in fixup_reorder_chain, at cfglayout.c:797
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2010 13:55:56 -0000
- Subject: [Bug bootstrap/44469] [4.5/4.6 Regression] internal compiler error: in fixup_reorder_chain, at cfglayout.c:797
- References: <bug-44469-14457@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from jakub at gcc dot gnu dot org 2010-06-09 13:55 -------
There are more issues:
1) cleanup_barriers seems to do weird things with these empty bbs from
__builtin_unreachable (), I guess it shouldn't reorder anything if prev is a
LABEL_P
2) the reason why this compiles fine on x86_64 seems to be in different bb
reordering. On arm the empty bb is reordered after the condjump, which means
its label is deleted by /* Remove code labels no longer used. */ in
try_optimize_cfg and then the block is trivially empty. On x86_64 we don't
ICE, but generate useless code:
movl (%rdi), %eax
testl %eax, %eax
je .L2
cmpl $1, %eax
jne .L3
movq %rdi, %rsi
.L2:
xorl %eax, %eax
cmpb $0, (%rsi)
sete %al
ret
.L3:
.cfi_endproc
I'd say we shouldn't try to delete just trivially_empty_bb_p's, but also ones
that before the bb note also have labels and after it nothing or only
DEBUG_INSNs, but we should delete only if we actually succeed adjusting the
jump insn at the end of the earlier block.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44469