[Bug bootstrap/44469] [4.5/4.6 Regression] internal compiler error: in fixup_reorder_chain, at cfglayout.c:797

2010-06-09 Thread jakub 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



[Bug bootstrap/44469] [4.5/4.6 Regression] internal compiler error: in fixup_reorder_chain, at cfglayout.c:797

2010-06-09 Thread jakub at gcc dot gnu dot org


--- Comment #2 from jakub at gcc dot gnu dot org  2010-06-09 12:51 ---
I guess for empty bbs with no successor where the predecessor ends in an
conditional jump without side-effects try_optimize_cfg can't do just
delete_basic_block, but needs to call some function to actually adjust the
conditional jump into unconditional.  Perhaps try_redirect_by_replacing_jump or
something similar.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44469



[Bug bootstrap/44469] [4.5/4.6 Regression] internal compiler error: in fixup_reorder_chain, at cfglayout.c:797

2010-06-08 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.5.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44469



[Bug bootstrap/44469] [4.5/4.6 Regression] internal compiler error: in fixup_reorder_chain, at cfglayout.c:797

2010-06-08 Thread siarhei dot siamashka at gmail dot com


--- Comment #1 from siarhei dot siamashka at gmail dot com  2010-06-08 
14:45 ---
Created an attachment (id=20868)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20868&action=view)
testcase.i


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44469