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
This commit is contained in:
Jakub Jelinek 2015-03-27 18:35:14 +01:00 committed by Jakub Jelinek
parent 4e55d61a1b
commit f21a589997
4 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,10 @@
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

View File

@ -13881,6 +13881,12 @@ legitimize_pic_address (rtx orig, rtx reg)
}
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)))
{

View File

@ -1,3 +1,8 @@
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

View File

@ -0,0 +1,4 @@
/* PR target/65593 */
/* { dg-additional-options "-fpie" { target pie } } */
#include "pr20928.c"