https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |ubizjak at gmail dot com
                 CC|uros at gcc dot gnu.org            |

--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Jakub Jelinek from comment #4)
> Of course, what exactly falls under the "g" constraint is target specific.
> Though, because that constraint also allows the constant to be reload into a
> register,
> if such constant isn't valid, then RA should have reloaded it into register
> or memory.
> 
> Seems the failure is that i386.cc (output_pic_addr_const) doesn't have the
> CONST_WIDE_INT case unlike output_addr_const.

Indeed.  Patch in testing:

--cut here--
diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
index 1cef7ee8f1a..477e6cecc38 100644
--- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.cc
@@ -12344,8 +12344,8 @@ output_pic_addr_const (FILE *file, rtx x, int code)
       assemble_name (asm_out_file, buf);
       break;

-    case CONST_INT:
-      fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
+    CASE_CONST_SCALAR_INT:
+      output_addr_const (file, x);
       break;

     case CONST:
--cut here--

Reply via email to