This makes sure to run cleanup-all-empty-eh even at -O0 via ehcleanup2.

Bootstrapped and tested on x86_64-unknown-linux-gnu, ok for trunk
(and branches?)

Thanks,
Richard.

2014-02-18  Richard Biener  <rguent...@suse.de>

        PR middle-end/60221
        * tree-eh.c (execute_cleanup_eh_1): Also cleanup empty EH
        regions at -O0.

Index: gcc/tree-eh.c
===================================================================
*** gcc/tree-eh.c       (revision 207837)
--- gcc/tree-eh.c       (working copy)
*************** execute_cleanup_eh_1 (void)
*** 4557,4567 ****
    remove_unreachable_handlers ();
  
    /* Watch out for the region tree vanishing due to all unreachable.  */
!   if (cfun->eh->region_tree && optimize)
      {
        bool changed = false;
  
!       changed |= unsplit_all_eh ();
        changed |= cleanup_all_empty_eh ();
  
        if (changed)
--- 4557,4568 ----
    remove_unreachable_handlers ();
  
    /* Watch out for the region tree vanishing due to all unreachable.  */
!   if (cfun->eh->region_tree)
      {
        bool changed = false;
  
!       if (optimize)
!       changed |= unsplit_all_eh ();
        changed |= cleanup_all_empty_eh ();
  
        if (changed)

Reply via email to