re PR middle-end/60221 (gcc -fexceptions generates unnecessary cleanup code)
authorRichard Biener <rguenther@suse.de>
Thu, 20 Feb 2014 09:00:23 +0000 (09:00 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 20 Feb 2014 09:00:23 +0000 (09:00 +0000)
2014-02-20  Richard Biener  <rguenther@suse.de>

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

From-SVN: r207937

gcc/ChangeLog
gcc/tree-eh.c

index 24d8e18..a5c8332 100644 (file)
@@ -1,3 +1,9 @@
+2014-02-20  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/60221
+       * tree-eh.c (execute_cleanup_eh_1): Also cleanup empty EH
+       regions at -O0.
+
 2014-02-20  Jan Hubicka  <hubicka@ucw.cz>
 
        PR ipa/58555
index 06941cd..14ed52a 100644 (file)
@@ -4557,11 +4557,12 @@ execute_cleanup_eh_1 (void)
   remove_unreachable_handlers ();
 
   /* Watch out for the region tree vanishing due to all unreachable.  */
-  if (cfun->eh->region_tree && optimize)
+  if (cfun->eh->region_tree)
     {
       bool changed = false;
 
-      changed |= unsplit_all_eh ();
+      if (optimize)
+       changed |= unsplit_all_eh ();
       changed |= cleanup_all_empty_eh ();
 
       if (changed)