This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: PR bootstrap/38742: Gcc failed to boostrap with --enable-checking=assert
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: vmakarov at redhat dot com
- Date: Tue, 6 Jan 2009 06:43:15 -0800
- Subject: PATCH: PR bootstrap/38742: Gcc failed to boostrap with --enable-checking=assert
Gcc failed to bootstrap with --enable-checking=assert. I am checking
this as an obvious fix.
Thanks.
H.J.
---
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.
Index: ira-int.h
===================================================================
--- ira-int.h (revision 143115)
+++ ira-int.h (working copy)
@@ -33,7 +33,9 @@ along with GCC; see the file COPYING3.
#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
Index: ira-color.c
===================================================================
--- ira-color.c (revision 143115)
+++ ira-color.c (working copy)
@@ -3037,11 +3037,13 @@ ira_reuse_stack_slot (int regno, unsigne
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)
{