PR target/65593
* config/i386/i386.c (legitimize_pic_address): If base
is SYMBOL_REF or LABEL_REF using %rip addressing, force
it to reg to avoid PLUS of SYMBOL_REF/LABEL_REF and register.
* gcc.c-torture/compile/pr65593.c: New test.
From-SVN: r221741
+2015-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/65593
+ * config/i386/i386.c (legitimize_pic_address): If base
+ is SYMBOL_REF or LABEL_REF using %rip addressing, force
+ it to reg to avoid PLUS of SYMBOL_REF/LABEL_REF and register.
+
2015-03-27 Jan Hubicka <hubicka@ucw.cz>
PR target/65531
}
else
{
+ /* For %rip addressing, we have to use just disp32, not
+ base nor index. */
+ if (TARGET_64BIT
+ && (GET_CODE (base) == SYMBOL_REF
+ || GET_CODE (base) == LABEL_REF))
+ base = force_reg (mode, base);
if (GET_CODE (new_rtx) == PLUS
&& CONSTANT_P (XEXP (new_rtx, 1)))
{
+2015-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/65593
+ * gcc.c-torture/compile/pr65593.c: New test.
+
2015-03-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59329
--- /dev/null
+/* PR target/65593 */
+/* { dg-additional-options "-fpie" { target pie } } */
+
+#include "pr20928.c"