Commit c21bbd7a by Jakub Jelinek Committed by Jakub Jelinek

re PR target/47201 (ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g)

	PR target/47201
	* config/i386/i386.c (ix86_delegitimize_address): If
	simplify_gen_subreg fails, return orig_x.

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

From-SVN: r168582
parent c6a8f6de
2011-01-07 Jakub Jelinek <jakub@redhat.com> 2011-01-07 Jakub Jelinek <jakub@redhat.com>
PR target/47201
* config/i386/i386.c (ix86_delegitimize_address): If
simplify_gen_subreg fails, return orig_x.
PR bootstrap/47187 PR bootstrap/47187
* value-prof.c (gimple_stringop_fixed_value): Handle * value-prof.c (gimple_stringop_fixed_value): Handle
lhs of the call properly. lhs of the call properly.
......
/* Subroutines used for code generation on IA-32. /* Subroutines used for code generation on IA-32.
Copyright (C) 1988, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, Copyright (C) 1988, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -13254,7 +13254,11 @@ ix86_delegitimize_address (rtx x) ...@@ -13254,7 +13254,11 @@ ix86_delegitimize_address (rtx x)
return ix86_delegitimize_tls_address (orig_x); return ix86_delegitimize_tls_address (orig_x);
x = XVECEXP (XEXP (x, 0), 0, 0); x = XVECEXP (XEXP (x, 0), 0, 0);
if (GET_MODE (orig_x) != Pmode) if (GET_MODE (orig_x) != Pmode)
return simplify_gen_subreg (GET_MODE (orig_x), x, Pmode, 0); {
x = simplify_gen_subreg (GET_MODE (orig_x), x, Pmode, 0);
if (x == NULL_RTX)
return orig_x;
}
return x; return x;
} }
...@@ -13323,7 +13327,11 @@ ix86_delegitimize_address (rtx x) ...@@ -13323,7 +13327,11 @@ ix86_delegitimize_address (rtx x)
return orig_x; return orig_x;
} }
if (GET_MODE (orig_x) != Pmode && MEM_P (orig_x)) if (GET_MODE (orig_x) != Pmode && MEM_P (orig_x))
return simplify_gen_subreg (GET_MODE (orig_x), result, Pmode, 0); {
result = simplify_gen_subreg (GET_MODE (orig_x), result, Pmode, 0);
if (result == NULL_RTX)
return orig_x;
}
return result; return result;
} }
2011-01-07 Jakub Jelinek <jakub@redhat.com> 2011-01-07 Jakub Jelinek <jakub@redhat.com>
PR target/47201
* gcc.dg/pr47201.c: New test.
PR bootstrap/47187 PR bootstrap/47187
* gcc.dg/tree-prof/pr47187.c: New test. * gcc.dg/tree-prof/pr47187.c: New test.
......
/* PR target/47201 */
/* { dg-do compile } */
/* { dg-options "-O -fpic -g" { target fpic } } */
union U
{
__UINTPTR_TYPE__ m;
float d;
} u;
int
foo (void)
{
union U v = {
(__UINTPTR_TYPE__)&u
};
return u.d == v.d;
}
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