This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/50633] [4.7 Regression] New test failures
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 06 Oct 2011 18:50:14 +0000
- Subject: [Bug middle-end/50633] [4.7 Regression] New test failures
- Auto-submitted: auto-generated
- References: <bug-50633-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50633
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> 2011-10-06 18:50:14 UTC ---
This patch seems to work:
diff --git a/gcc/function.c b/gcc/function.c
index 863f09d..0bc1dd9 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5312,6 +5312,21 @@ frame_required_for_rtx (rtx *loc, void *data
ATTRIBUTE_UNUSED)
if (x == stack_pointer_rtx || x == hard_frame_pointer_rtx
|| x == arg_pointer_rtx || x == pic_offset_table_rtx)
return 1;
+ if (x != NULL
+ && REG_P (x)
+ && ((stack_pointer_rtx != NULL
+ && REG_P (stack_pointer_rtx)
+ && REGNO (x) == REGNO (stack_pointer_rtx))
+ || (hard_frame_pointer_rtx != NULL
+ && REG_P (hard_frame_pointer_rtx)
+ && REGNO (x) == REGNO (hard_frame_pointer_rtx))
+ || (arg_pointer_rtx != NULL
+ && REG_P (arg_pointer_rtx)
+ && REGNO (x) == REGNO (arg_pointer_rtx))
+ || (pic_offset_table_rtx != NULL
+ && REG_P (pic_offset_table_rtx)
+ && REGNO (x) == REGNO (pic_offset_table_rtx))))
+ return 1;
return 0;
}