This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/55142] [4.8 Regression] internal compiler error: in plus_constant, at explow.c:88


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]