]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR bootstrap/38742 (Gcc failed to boostrap with --enable-checking=assert)
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 6 Jan 2009 14:44:02 +0000 (14:44 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 6 Jan 2009 14:44:02 +0000 (06:44 -0800)
2009-01-06  H.J. Lu  <hongjiu.lu@intel.com>

PR bootstrap/38742
* ira-color.c (ira_reuse_stack_slot): Check ENABLE_IRA_CHECKING
before using pseudos_have_intersected_live_ranges_p.

* ira-int.h (ira_assert): Always define.

From-SVN: r143117

gcc/ChangeLog
gcc/ira-color.c
gcc/ira-int.h

index 72df4c283df9ac4d9f369da474afe69a4fcc620e..9c9a5fad3e8698d09e2e3e7c986fb6b587bc2d6e 100644 (file)
@@ -1,3 +1,11 @@
+2009-01-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR bootstrap/38742
+       * ira-color.c (ira_reuse_stack_slot): Check ENABLE_IRA_CHECKING
+       before using pseudos_have_intersected_live_ranges_p.
+
+       * ira-int.h (ira_assert): Always define.
+
 2009-01-06  H.J. Lu  <hongjiu.lu@intel.com>
 
        AVX Programming Reference (December, 2008)
index c7c600bc41c58aafc99ea642fd92977bd79bbfd1..f1adb1da06a27a03dd1a46a95d047d4b691235c4 100644 (file)
@@ -3037,11 +3037,13 @@ ira_reuse_stack_slot (int regno, unsigned int inherent_size,
   if (x != NULL_RTX)
     {
       ira_assert (slot->width >= total_size);
+#ifdef ENABLE_IRA_CHECKING
       EXECUTE_IF_SET_IN_BITMAP (&slot->spilled_regs,
                                FIRST_PSEUDO_REGISTER, i, bi)
        {
          ira_assert (! pseudos_have_intersected_live_ranges_p (regno, i));
        }
+#endif
       SET_REGNO_REG_SET (&slot->spilled_regs, regno);
       if (internal_flag_ira_verbose > 3 && ira_dump_file)
        {
index 1fc6da265e2f9b3eee2b077898150b0623807659..b6605d59a7a9d8d7f5c4437c8547c0999923ec47 100644 (file)
@@ -33,7 +33,9 @@ along with GCC; see the file COPYING3.  If not see
 #ifdef ENABLE_IRA_CHECKING
 #define ira_assert(c) gcc_assert (c)
 #else
-#define ira_assert(c)
+/* Always define and include C, so that warnings for empty body in an
+  ‘if’ statement and unused variable do not occur.  */
+#define ira_assert(c) ((void)(0 && (c)))
 #endif
 
 /* Compute register frequency from edge frequency FREQ.  It is