This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/49982] [4.7 Regression] ICE in fixup_args_size_notes, at expr.c:3625
- From: "rth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 5 Aug 2011 15:16:14 +0000
- Subject: [Bug rtl-optimization/49982] [4.7 Regression] ICE in fixup_args_size_notes, at expr.c:3625
- Auto-submitted: auto-generated
- References: <bug-49982-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49982
--- Comment #2 from Richard Henderson <rth at gcc dot gnu.org> 2011-08-05 15:15:47 UTC ---
Ah, thank you reload for silly intermediate states. But at least
it gets cleaned up afterward. So, yes, your fix is correct.
But I'd prefer a slight variation:
diff --git a/gcc/expr.c b/gcc/expr.c
index e5bec34..f170596 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -3631,6 +3631,10 @@ fixup_args_size_notes (rtx prev, rtx last, int
end_args_size)
&& XEXP (SET_SRC (set), 0) == stack_pointer_rtx
&& CONST_INT_P (XEXP (SET_SRC (set), 1)))
this_delta = INTVAL (XEXP (SET_SRC (set), 1));
+ /* ??? Reload can generate no-op moves, which will be cleaned
+ up later. Recognize it and continue searching. */
+ else if (rtx_equal_p (dest, SET_SRC (set)))
+ this_delta = 0;
else
saw_unknown = true;
}
since we tested REGNO and not stack_pointer_rtx earlier.