Patchwork [obv] fix bootstrap with --enable-checking=release

login
register
mail settings
Submitter Nathan Froyd
Date Oct. 21, 2010, 9:38 p.m.
Message ID <20101021213823.GO2806@nightcrawler>
Download mbox | patch
Permalink /patch/68781/
State New
Headers show

Comments

Nathan Froyd - Oct. 21, 2010, 9:38 p.m.
My s/gcc_assert/gcc_checking_assert/ broke bootstrap when we're not
checking, as several calls refer to variables or functions that are only
defined when ENABLE_CHECKING.  The patch below, which simply restores
the previous state of affairs for the affected callsites, lets me make
it through an --enable-checking=release bootstrap on
x86_64-unknown-linux-gnu.  I am applying it as obvious.

-Nathan

	* ddg.c (add_cross_iteration_register_deps): Call gcc_assert instead
	of gcc_checking_assert.
	* sel-sched.c (code_motion_process_successors): Likewise.

Patch

diff --git a/gcc/ddg.c b/gcc/ddg.c
index d7b093b..2cf0630 100644
--- a/gcc/ddg.c
+++ b/gcc/ddg.c
@@ -262,9 +262,11 @@  add_cross_iteration_register_deps (ddg_ptr g, df_ref last_def)
   gcc_assert (last_def_node);
   gcc_assert (first_def);
 
+#ifdef ENABLE_CHECKING
   if (DF_REF_ID (last_def) != DF_REF_ID (first_def))
-    gcc_checking_assert (!bitmap_bit_p (&bb_info->gen,
-					DF_REF_ID (first_def)));
+    gcc_assert (!bitmap_bit_p (&bb_info->gen,
+			       DF_REF_ID (first_def)));
+#endif
 
   /* Create inter-loop true dependences and anti dependences.  */
   for (r_use = DF_REF_CHAIN (last_def); r_use != NULL; r_use = r_use->next)
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index 378e561..ce014ed 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -6360,6 +6360,7 @@  code_motion_process_successors (insn_t insn, av_set_t orig_ops,
         goto rescan;
     }
 
+#ifdef ENABLE_CHECKING
   /* Here, RES==1 if original expr was found at least for one of the
      successors.  After the loop, RES may happen to have zero value
      only if at some point the expr searched is present in av_set, but is
@@ -6367,11 +6368,12 @@  code_motion_process_successors (insn_t insn, av_set_t orig_ops,
      The exception is when the original operation is blocked by
      bookkeeping generated for another fence or for another path in current
      move_op.  */
-  gcc_checking_assert (res == 1
-		       || (res == 0
-			   && av_set_could_be_blocked_by_bookkeeping_p (orig_ops,
-									static_params))
-		       || res == -1);
+  gcc_assert (res == 1
+	      || (res == 0
+		  && av_set_could_be_blocked_by_bookkeeping_p (orig_ops,
+							       static_params))
+	      || res == -1);
+#endif
 
   /* Merge data, clean up, etc.  */
   if (res != -1 && code_motion_path_driver_info->after_merge_succs)