This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/55142] [4.8 Regression] internal compiler error: in plus_constant, at explow.c:88
- 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: Wed, 31 Oct 2012 02:21:16 +0000
- Subject: [Bug middle-end/55142] [4.8 Regression] internal compiler error: in plus_constant, at explow.c:88
- Auto-submitted: auto-generated
- References: <bug-55142-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55142
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.8.0
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-10-31 02:21:16 UTC ---
This
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 2284703..8569418 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -12902,6 +12902,8 @@ legitimize_pic_address (rtx orig, rtx reg)
else
{
base = legitimize_pic_address (XEXP (addr, 0), reg);
+ if (GET_MODE (base) != Pmode)
+ base = convert_to_mode (Pmode, base, 1);
new_rtx = legitimize_pic_address (XEXP (addr, 1),
base == reg ? NULL_RTX : reg);
fixes the testcase.