Commit cfbab41c by Jakub Jelinek Committed by Jakub Jelinek

re PR target/14533 (s390x internal compiler error: in legitimize_pic_address, at…

re PR target/14533 (s390x internal compiler error: in legitimize_pic_address, at config/s390/s390.c:2276)

	PR target/14533
	* config/s390/s390.c (legitimize_pic_address): Don't abort on UNSPEC
	other than UNSPEC_GOTOFF.

	* gcc.dg/20040311-2.c: New test.

From-SVN: r79442
parent 1e1ab407
2004-03-13 Jakub Jelinek <jakub@redhat.com>
PR target/14533
* config/s390/s390.c (legitimize_pic_address): Don't abort on UNSPEC
other than UNSPEC_GOTOFF.
2004-03-13 Richard Earnshaw <rearnsha@arm.com> 2004-03-13 Richard Earnshaw <rearnsha@arm.com>
* arm.c (arm_legitimate_address_p): New argument, OUTER. Pass through * arm.c (arm_legitimate_address_p): New argument, OUTER. Pass through
......
...@@ -2545,7 +2545,7 @@ legitimize_pic_address (rtx orig, rtx reg) ...@@ -2545,7 +2545,7 @@ legitimize_pic_address (rtx orig, rtx reg)
addr = gen_rtx_PLUS (Pmode, addr, op1); addr = gen_rtx_PLUS (Pmode, addr, op1);
addr = gen_rtx_CONST (Pmode, addr); addr = gen_rtx_CONST (Pmode, addr);
addr = force_const_mem (Pmode, addr); addr = force_const_mem (Pmode, addr);
emit_move_insn (temp, addr); emit_move_insn (temp, addr);
new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp); new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp);
if (reg != 0) if (reg != 0)
...@@ -2560,12 +2560,11 @@ legitimize_pic_address (rtx orig, rtx reg) ...@@ -2560,12 +2560,11 @@ legitimize_pic_address (rtx orig, rtx reg)
that was pulled out of the literal pool. Force it back in. */ that was pulled out of the literal pool. Force it back in. */
else if (GET_CODE (op0) == UNSPEC else if (GET_CODE (op0) == UNSPEC
&& GET_CODE (op1) == CONST_INT) && GET_CODE (op1) == CONST_INT
&& XINT (op0, 1) == UNSPEC_GOTOFF)
{ {
if (XVECLEN (op0, 0) != 1) if (XVECLEN (op0, 0) != 1)
abort (); abort ();
if (XINT (op0, 1) != UNSPEC_GOTOFF)
abort ();
new = force_const_mem (Pmode, orig); new = force_const_mem (Pmode, orig);
} }
......
2004-03-13 Jakub Jelinek <jakub@redhat.com>
PR target/14533
* gcc.dg/20040311-2.c: New test.
2004-03-12 Kazu Hirata <kazu@cs.umass.edu> 2004-03-12 Kazu Hirata <kazu@cs.umass.edu>
PR other/14544 PR other/14544
......
/* PR target/14533 */
/* { dg-do compile } */
/* { dg-options "-O2 -fpic" } */
void bar (char *, int);
extern char b[];
extern int d, e;
struct S
{
struct S *m;
int n;
} **g;
void
foo (int x, char *y)
{
struct S *h;
int k = 1, l;
again:
for (h = *g; h != (struct S *) g; h = h->m)
{
if (k == 0 && h->n & 0x100000);
l = y - b;
if (e)
bar (b, l);
if (d)
bar (b, l);
}
if (k)
{
k = 0;
goto again;
}
}
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