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]

[vta4.3, vta] move var-tracking variables only used in ENABLE_CHECKING


The two variables I introduced in variable_htab_eq were only used with
ENABLE_CHECKING.  This is disabled in the release branch, so I got a
bootstrap failure.  Fixed thusly.  Other than adding braces and moving
the declaration, this is just reindentation.

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

	* var-tracking.c (variable_htab_eq): Move checking-only variables
	into ENABLE_CHECKING block.

Index: gcc/var-tracking.c
===================================================================
--- gcc/var-tracking.c.orig	2008-07-29 16:43:51.000000000 -0300
+++ gcc/var-tracking.c	2008-07-30 14:01:43.000000000 -0300
@@ -785,24 +785,27 @@ variable_htab_eq (const void *x, const v
 {
   const_variable const v = (const_variable) x;
   decl_or_value dv = *(decl_or_value const*)y;
-  bool visv, dvisv;
 
   if (dv_as_opaque (v->dv) == dv_as_opaque (dv))
     return true;
 
 #ifdef ENABLE_CHECKING
-  visv = dv_is_value_p (v->dv);
-  dvisv = dv_is_value_p (dv);
+  {
+    bool visv, dvisv;
 
-  if (visv != dvisv)
-    return false;
+    visv = dv_is_value_p (v->dv);
+    dvisv = dv_is_value_p (dv);
 
-  if (visv)
-    gcc_assert (CSELIB_VAL_PTR (dv_as_value (v->dv))
-		!= CSELIB_VAL_PTR (dv_as_value (dv)));
-  else
-    gcc_assert (VARIABLE_HASH_VAL (dv_as_decl (v->dv))
-		!= VARIABLE_HASH_VAL (dv_as_decl (dv)));
+    if (visv != dvisv)
+      return false;
+
+    if (visv)
+      gcc_assert (CSELIB_VAL_PTR (dv_as_value (v->dv))
+		  != CSELIB_VAL_PTR (dv_as_value (dv)));
+    else
+      gcc_assert (VARIABLE_HASH_VAL (dv_as_decl (v->dv))
+		  != VARIABLE_HASH_VAL (dv_as_decl (dv)));
+  }
 #endif
 
   return false;
-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}
FSFLA Board Member       ÂSÃ Libre! => http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}

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