[Bug tree-optimization/30564] [4.3 Regression] ice for legal code with -O3

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Jan 27 23:31:00 GMT 2007



------- Comment #9 from pinskia at gcc dot gnu dot org  2007-01-27 23:31 -------
The problem is we are calling fold_marked_statements after renumbering the
basic blocks and such which causes us to get the wrong starting point.
patch which I am tesing:
Index: ../../gcc/tree-inline.c
===================================================================
--- ../../gcc/tree-inline.c     (revision 121236)
+++ ../../gcc/tree-inline.c     (working copy)
@@ -2658,6 +2658,10 @@
     gimple_expand_calls_inline (bb, &id);

   pop_gimplify_context (NULL);
+  
+  fold_marked_statements (last, id.statements_to_fold);
+  pointer_set_destroy (id.statements_to_fold);
+  
   /* Renumber the (code) basic_blocks consecutively.  */
   compact_blocks ();
   /* Renumber the lexical scoping (non-code) blocks consecutively.  */
@@ -2683,8 +2687,6 @@
      Kill it so it won't confuse us.  */
   cgraph_node_remove_callees (id.dst_node);

-  fold_marked_statements (last, id.statements_to_fold);
-  pointer_set_destroy (id.statements_to_fold);
   fold_cond_expr_cond ();
   /* We make no attempts to keep dominance info up-to-date.  */
   free_dominance_info (CDI_DOMINATORS);


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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



More information about the Gcc-bugs mailing list