[Bug rtl-optimization/52139] [4.5 Regression] ICE: in remove_insn, at emit-rtl.c:3960 with -O -fPIC -fno-tree-dominator-opts -fno-tree-fre

2013-04-16 Thread steven at gcc dot gnu.org


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



Steven Bosscher steven at gcc dot gnu.org changed:



   What|Removed |Added



 Status|NEW |RESOLVED

 CC|steven at gcc dot gnu.org   |

 Resolution||FIXED

   Target Milestone|4.5.4   |4.9.0



--- Comment #13 from Steven Bosscher steven at gcc dot gnu.org 2013-04-16 
20:15:41 UTC ---

Now properly fixed, xf. r197995


[Bug rtl-optimization/52139] [4.5 Regression] ICE: in remove_insn, at emit-rtl.c:3960 with -O -fPIC -fno-tree-dominator-opts -fno-tree-fre

2013-04-13 Thread steven at gcc dot gnu.org


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



Steven Bosscher steven at gcc dot gnu.org changed:



   What|Removed |Added



 Status|REOPENED|NEW

 AssignedTo|unassigned at gcc dot   |steven at gcc dot gnu.org

   |gnu.org |



--- Comment #12 from Steven Bosscher steven at gcc dot gnu.org 2013-04-13 
14:58:53 UTC ---

Created attachment 29866

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29866

Corrected fix



In cfglayout mode, header and footer insns should not be inserted in

the insn chain.



The real bug here turns out to be in cfg_layout_delete_block: It deletes

the basic block by re-attaching the header and footer to the insn chain

and uses rtl_delete_block to actually delete the basic block.  But at that

point, try_redirect_by_replacing_jump has already removed the tablejump

instruction, so get_last_bb_insn doesn't extend the basic block to include

the jump table data.  I will address that in a separate patch, but I'm not

sure yet how :-)


[Bug rtl-optimization/52139] [4.5 Regression] ICE: in remove_insn, at emit-rtl.c:3960 with -O -fPIC -fno-tree-dominator-opts -fno-tree-fre

2013-04-11 Thread steven at gcc dot gnu.org


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



Steven Bosscher steven at gcc dot gnu.org changed:



   What|Removed |Added



 Status|RESOLVED|REOPENED

 Resolution|FIXED   |



--- Comment #10 from Steven Bosscher steven at gcc dot gnu.org 2013-04-11 
19:23:01 UTC ---

The fix is wrong, if there is a jump table at the end of basic block a,

and a ends in a tablejump, then the blocks cannot be merged.  In the case

of this PR, the jump table must be dead and someone left it lingering.

The bug is the presence of a dead jump table, and the patch only papers

over the issue.


[Bug rtl-optimization/52139] [4.5 Regression] ICE: in remove_insn, at emit-rtl.c:3960 with -O -fPIC -fno-tree-dominator-opts -fno-tree-fre

2013-04-11 Thread steven at gcc dot gnu.org


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



--- Comment #11 from Steven Bosscher steven at gcc dot gnu.org 2013-04-11 
19:26:09 UTC ---

The proper fix is to simply prepend BB_HEADER_(b) to BB_FOOTER(b).  The

reason for linking BB_HEADER to BB_END(a) is that there used to be line

notes there:



  /* Possible line number notes should appear in between.  */



But that's ancient history.



On top of that, anything in BB_FOOTER(b) should *never* end up in the

insns chain, by definition of cfglayout's footers.


[Bug rtl-optimization/52139] [4.5 Regression] ICE: in remove_insn, at emit-rtl.c:3960 with -O -fPIC -fno-tree-dominator-opts -fno-tree-fre

2012-02-09 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52139

--- Comment #8 from Jakub Jelinek jakub at gcc dot gnu.org 2012-02-09 
21:39:23 UTC ---
Author: jakub
Date: Thu Feb  9 21:39:20 2012
New Revision: 184074

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=184074
Log:
Backported from mainline
2012-02-08  Jakub Jelinek  ja...@redhat.com

PR rtl-optimization/52139
* cfgrtl.c (cfg_layout_merge_blocks): If BB_END
is a BARRIER after emit_insn_after_noloc, move BB_END
to the last non-BARRIER insn before it.

* gcc.dg/pr52139.c: New test.

Added:
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/pr52139.c
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/cfgrtl.c
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


[Bug rtl-optimization/52139] [4.5 Regression] ICE: in remove_insn, at emit-rtl.c:3960 with -O -fPIC -fno-tree-dominator-opts -fno-tree-fre

2012-02-09 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52139

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #9 from Jakub Jelinek jakub at gcc dot gnu.org 2012-02-09 
21:48:25 UTC ---
Fixed.