diff mbox

[RFA] Fix DEBUG_RELOAD support

Message ID CADSXKXpG21E4cBABdGmYftMwcHYYH2Uw1DNA_O9_+YxFPRt7gw@mail.gmail.com
State New
Headers show

Commit Message

Matthew Gretton-Dann Feb. 2, 2013, 9:27 p.m. UTC
Hi,

Whilst debugging a reload issue I tried enabling DEBUG_RELOAD, only to
find that this caused GCC to fail to build.  I think this failure was
introduced during the change to vec being a C++ type, as DEBUG_RELOAD
is normally forced off.

The attached patch fixes the build issue.  Tested by building a cross
arm-none-linux-gnueabi compiler with DEBUG_RELOAD forced on.

OK for trunk?

gcc/ChangeLog:

2013-02-02  Matthew Gretton-Dann  <matthew.gretton-dann@linaro.org>

        * gcc/reload.c (subst_reloads): Fix DEBUG_RELOAD build issue.


--
Matthew Gretton-Dann
Linaro Toolchain Working Group
matthew.gretton-dann@linaro.org

Comments

Jeff Law Feb. 4, 2013, 4:23 p.m. UTC | #1
On 02/02/2013 02:27 PM, Matthew Gretton-Dann wrote:
> 2013-02-02  Matthew Gretton-Dann<matthew.gretton-dann@linaro.org>
>
>          * gcc/reload.c (subst_reloads): Fix DEBUG_RELOAD build issue.
Thanks.  Applied to the trunk.

Jeff
diff mbox

Patch

diff --git a/gcc/reload.c b/gcc/reload.c
index 889a6cc..2546c1b 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -6313,14 +6313,14 @@  subst_reloads (rtx insn)
 	  for (check_regno = 0; check_regno < max_regno; check_regno++)
 	    {
 #define CHECK_MODF(ARRAY)						\
-	      gcc_assert (!reg_equivs[check_regno].ARRAY		\
+	      gcc_assert (!(*reg_equivs)[check_regno].ARRAY		\
 			  || !loc_mentioned_in_p (r->where,		\
-						  reg_equivs[check_regno).ARRAY)]
+						  (*reg_equivs)[check_regno].ARRAY))
 
-	      CHECK_MODF (equiv_constant);
-	      CHECK_MODF (equiv_memory_loc);
-	      CHECK_MODF (equiv_address);
-	      CHECK_MODF (equiv_mem);
+	      CHECK_MODF (constant);
+	      CHECK_MODF (memory_loc);
+	      CHECK_MODF (address);
+	      CHECK_MODF (mem);
 #undef CHECK_MODF
 	    }
 #endif /* DEBUG_RELOAD */