diff mbox

patch to fix bootstrap with disabled checking

Message ID 508A0686.20909@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov Oct. 26, 2012, 3:41 a.m. UTC
The following patch fixes reported bootstrap failure when 
--disable-checking is used.

    The patch was successfully bootstrapped with and without 
--disable-checking.

2012-10-25  Vladimir Makarov  <vmakarov@redhat.com>

     * lra-int.h (lra_assert): Redefine it gcc_checking_assert.
     * lra-constraints.c (check_and_process_move): Remove #if
     ENABLE_ASSERT_CHECKING.
diff mbox

Patch

Index: lra-constraints.c
===================================================================
--- lra-constraints.c	(revision 192829)
+++ lra-constraints.c	(working copy)
@@ -1204,10 +1204,8 @@  check_and_process_move (bool *change_p,
       || ((secondary_class != NO_REGS || sri.icode != CODE_FOR_nothing)
 	  && dclass != NO_REGS))
     {
-#if ENABLE_ASSERT_CHECKING
       enum reg_class old_sclass = secondary_class;
       secondary_reload_info old_sri = sri;
-#endif
 
       sri.prev_sri = NULL;
       sri.icode = CODE_FOR_nothing;
Index: lra-int.h
===================================================================
--- lra-int.h	(revision 192829)
+++ lra-int.h	(working copy)
@@ -25,13 +25,7 @@  along with GCC; see the file COPYING3.	I
 #include "insn-attr.h"
 #include "insn-codes.h"
 
-#ifdef ENABLE_CHECKING
-#define lra_assert(c) gcc_assert (c)
-#else
-/* Always define and include C, so that warnings for empty body in an
-  ‘if’ statement and unused variable do not occur.  */
-#define lra_assert(c) ((void)(0 && (c)))
-#endif
+#define lra_assert(c) gcc_checking_assert (c)
 
 /* The parameter used to prevent infinite reloading for an insn.  Each
    insn operands might require a reload and, if it is a memory, its