This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[vta] accept debug stmts in empty EH handlers


Empty EH handler detection was misled by debug stmts, causing
-fcompare-debug failures.  This patch fixes it.

for  gcc/ChangeLog.vta
from  Alexandre Oliva  <aoliva@redhat.com>

	* tree-eh.c (tree_empty_eh_handler_p): Skip debug stmts.

Index: gcc/tree-eh.c
===================================================================
--- gcc/tree-eh.c.orig	2009-05-12 03:45:41.000000000 -0300
+++ gcc/tree-eh.c	2009-05-15 17:13:59.000000000 -0300
@@ -2805,7 +2805,7 @@ tree_empty_eh_handler_p (basic_block bb)
   region = gimple_resx_region (gsi_stmt (gsi));
 
   /* filter_object set.  */
-  gsi_prev (&gsi);
+  gsi_prev_nondebug (&gsi);
   if (gsi_end_p (gsi))
     return 0;
   if (gimple_code (gsi_stmt (gsi)) == GIMPLE_ASSIGN)
@@ -2818,7 +2818,7 @@ tree_empty_eh_handler_p (basic_block bb)
       filter_tmp = gimple_assign_rhs1 (gsi_stmt (gsi));
 
       /* filter_object set.  */
-      gsi_prev (&gsi);
+      gsi_prev_nondebug (&gsi);
       if (gsi_end_p (gsi))
 	return 0;
       if (gimple_code (gsi_stmt (gsi)) != GIMPLE_ASSIGN)
@@ -2830,7 +2830,7 @@ tree_empty_eh_handler_p (basic_block bb)
       /* exc_ptr get.  */
       if (TREE_CODE (exc_ptr_tmp) != EXC_PTR_EXPR)
 	{
-	  gsi_prev (&gsi);
+	  gsi_prev_nondebug (&gsi);
 	  if (gsi_end_p (gsi))
 	    return 0;
 	  if (gimple_code (gsi_stmt (gsi)) != GIMPLE_ASSIGN)
@@ -2846,7 +2846,7 @@ tree_empty_eh_handler_p (basic_block bb)
       /* filter_object get.  */
       if (TREE_CODE (filter_tmp) != FILTER_EXPR)
 	{
-	  gsi_prev (&gsi);
+	  gsi_prev_nondebug (&gsi);
 	  if (gsi_end_p (gsi))
 	    return 0;
 	  if (gimple_code (gsi_stmt (gsi)) != GIMPLE_ASSIGN)
@@ -2860,7 +2860,7 @@ tree_empty_eh_handler_p (basic_block bb)
 	}
 
       /* label.  */
-      gsi_prev (&gsi);
+      gsi_prev_nondebug (&gsi);
       if (gsi_end_p (gsi))
 	return 0;
     }

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]