Commit 6ac719d3 by Jakub Jelinek Committed by Jakub Jelinek

re PR target/41762 (internal compiler error when compiling xorg-server)

	PR target/41762
	* config/i386/i386.c (ix86_pic_register_p): Don't call
	rtx_equal_for_cselib_p for VALUEs discarded as useless.

	* gcc.dg/pr41762.c: New test.

From-SVN: r153667
parent 7cf72011
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
vt_expand_loc unnecessarily when location is not a register nor vt_expand_loc unnecessarily when location is not a register nor
memory. memory.
PR target/41762
* config/i386/i386.c (ix86_pic_register_p): Don't call
rtx_equal_for_cselib_p for VALUEs discarded as useless.
2009-10-28 Richard Sandiford <rdsandiford@googlemail.com> 2009-10-28 Richard Sandiford <rdsandiford@googlemail.com>
* var-tracking.c (emit_note_insn_var_location): Get the mode of * var-tracking.c (emit_note_insn_var_location): Get the mode of
...@@ -10794,7 +10794,7 @@ i386_output_dwarf_dtprel (FILE *file, int size, rtx x) ...@@ -10794,7 +10794,7 @@ i386_output_dwarf_dtprel (FILE *file, int size, rtx x)
static bool static bool
ix86_pic_register_p (rtx x) ix86_pic_register_p (rtx x)
{ {
if (GET_CODE (x) == VALUE) if (GET_CODE (x) == VALUE && CSELIB_VAL_PTR (x))
return (pic_offset_table_rtx return (pic_offset_table_rtx
&& rtx_equal_for_cselib_p (x, pic_offset_table_rtx)); && rtx_equal_for_cselib_p (x, pic_offset_table_rtx));
else else
......
2009-10-28 Jakub Jelinek <jakub@redhat.com>
PR target/41762
* gcc.dg/pr41762.c: New test.
2009-10-28 Richard Guenther <rguenther@suse.de> 2009-10-28 Richard Guenther <rguenther@suse.de>
PR middle-end/41855 PR middle-end/41855
......
/* PR target/41762 */
/* { dg-do compile } */
/* { dg-options "-O2 -ftracer -fsched2-use-superblocks" } */
/* { dg-options "-O2 -ftracer -fsched2-use-superblocks -fpic" { target fpic } } */
extern __SIZE_TYPE__ strlen (const char *);
extern int f1 (void *);
extern char *f2 (void);
extern void f3 (int, int);
static char *a;
char *b, *c, *d, *e;
void
foo (void)
{
int f, g, h;
f = (a ? strlen (a) : strlen ("abcde"));
f += (b ? strlen (b) : 0);
f += (c ? strlen (c) : 0);
f += (d ? strlen (d) : 0);
f += (e ? strlen (e) : 0);
h = f1 (strlen);
g = strlen (a);
f3 (g, f);
}
void
bar (void)
{
a = f2 ();
}
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