re PR target/48213 (ICE in simplify_subreg called from s390_delegitimize_address)

PR target/48213
	* config/s390/s390.c (s390_delegitimize_address): Don't call
	lowpart_subreg if orig_x has BLKmode.

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

From-SVN: r171211
This commit is contained in:
Jakub Jelinek 2011-03-21 10:25:47 +01:00 committed by Jakub Jelinek
parent 5050afdf0f
commit 2f36e14bfd
4 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2011-03-21 Jakub Jelinek <jakub@redhat.com>
PR target/48213
* config/s390/s390.c (s390_delegitimize_address): Don't call
lowpart_subreg if orig_x has BLKmode.
2011-03-21 Kai Tietz <ktietz@redhat.com>
PR target/12171

View File

@ -5062,6 +5062,8 @@ s390_delegitimize_address (rtx orig_x)
if (GET_MODE (orig_x) != Pmode)
{
if (GET_MODE (orig_x) == BLKmode)
return orig_x;
y = lowpart_subreg (GET_MODE (orig_x), y, Pmode);
if (y == NULL_RTX)
return orig_x;

View File

@ -1,3 +1,8 @@
2011-03-21 Jakub Jelinek <jakub@redhat.com>
PR target/48213
* gcc.dg/pr48213.c: New test.
2011-03-21 Kai Tietz <ktietz@redhat.com>
PR target/12171

View File

@ -0,0 +1,14 @@
/* PR target/48213 */
/* { dg-do compile } */
/* { dg-options "-g -O2" } */
/* { dg-options "-g -O2 -fpic" { target fpic } } */
struct S { int (*s) (void); };
int bar (void);
void
foo (struct S *x)
{
if (x->s != bar)
bar ();
}