Commit f21a5899 by Jakub Jelinek Committed by Jakub Jelinek

re PR target/65593 (internal compiler error: in extract_insn, at recog.c:2343)

	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
parent 4e55d61a
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> 2015-03-27 Jan Hubicka <hubicka@ucw.cz>
PR target/65531 PR target/65531
......
...@@ -13881,6 +13881,12 @@ legitimize_pic_address (rtx orig, rtx reg) ...@@ -13881,6 +13881,12 @@ legitimize_pic_address (rtx orig, rtx reg)
} }
else 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 if (GET_CODE (new_rtx) == PLUS
&& CONSTANT_P (XEXP (new_rtx, 1))) && 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> 2015-03-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59329 PR c++/59329
......
/* PR target/65593 */
/* { dg-additional-options "-fpie" { target pie } } */
#include "pr20928.c"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment