------- Comment #6 from hubicka at gcc dot gnu dot org  2007-02-24 22:58 -------
I am testing a fix:
Index: tree-inline.c
===================================================================
*** tree-inline.c       (revision 122292)
--- tree-inline.c       (working copy)
*************** copy_bb (copy_body_data *id, basic_block
*** 873,879 ****
              gcc_assert (lookup_stmt_eh_region_fn (id->src_cfun, orig_stmt)
                          != 0);

!             if (tree_could_throw_p (stmt))
                {
                  int region = lookup_stmt_eh_region_fn (id->src_cfun,
orig_stmt);
                  /* Add an entry for the copied tree in the EH hashtable.
--- 873,892 ----
              gcc_assert (lookup_stmt_eh_region_fn (id->src_cfun, orig_stmt)
                          != 0);

!             if (tree_could_throw_p (stmt)
!                 /* When we are cloning for inlining, we are supposed to
!                    construct a clone that calls precisely the same functions
!                    as original.  However IPA optimizers might've proved
!                    earlier some function calls as non-trapping that might
!                    render some basic blocks dead that might become
!                    unreachable.
! 
!                    We can't update SSA with unreachable blocks in CFG and
thus
!                    we prevent the scenario by preserving even the "dead" eh
!                    edges until the point they are later removed by
!                    fixup_cfg pass.  */
!                 || (id->transform_call_graph_edges == CB_CGE_MOVE
!                     && lookup_stmt_eh_region_fn (id->src_cfun, orig_stmt) >
0))
                {
                  int region = lookup_stmt_eh_region_fn (id->src_cfun,
orig_stmt);
                  /* Add an entry for the copied tree in the EH hashtable.


-- 

hubicka at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |hubicka at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-01-22 02:17:10         |2007-02-24 22:58:13
               date|                            |


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

Reply via email to