emit-rtl.c (subreg_hard_regno): Only do HARD_REGNO_MODE_OK check if check_mode is non-zero.
* emit-rtl.c (subreg_hard_regno): Only do HARD_REGNO_MODE_OK check if check_mode is non-zero. * gcc.dg/20010423-1.c: New test. From-SVN: r41537
This commit is contained in:
parent
e99af66bba
commit
0607953c7d
@ -1,3 +1,8 @@
|
||||
2001-04-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* emit-rtl.c (subreg_hard_regno): Only do HARD_REGNO_MODE_OK check
|
||||
if check_mode is non-zero.
|
||||
|
||||
2001-04-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/i386/i386.c (ix86_expand_int_movcc): If overlap between
|
||||
|
@ -719,7 +719,7 @@ subreg_hard_regno (x, check_mode)
|
||||
base_regno = REGNO (reg);
|
||||
if (base_regno >= FIRST_PSEUDO_REGISTER)
|
||||
abort ();
|
||||
if (! HARD_REGNO_MODE_OK (base_regno, GET_MODE (reg)))
|
||||
if (check_mode && ! HARD_REGNO_MODE_OK (base_regno, GET_MODE (reg)))
|
||||
abort ();
|
||||
|
||||
/* Catch non-congruent offsets too. */
|
||||
|
@ -1,3 +1,7 @@
|
||||
2001-04-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gcc.dg/20010423-1.c: New test.
|
||||
|
||||
2001-04-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gcc.c-torture/execute/20010422-1.c: New test.
|
||||
|
17
gcc/testsuite/gcc.dg/20010423-1.c
Normal file
17
gcc/testsuite/gcc.dg/20010423-1.c
Normal file
@ -0,0 +1,17 @@
|
||||
/* { dg-do compile { target ia64-*-* } } */
|
||||
/* { dg-options "-O2" } */
|
||||
|
||||
int __sync_fetch_and_add_si (int *, int);
|
||||
|
||||
inline unsigned int
|
||||
bar (volatile unsigned int *mem, unsigned int val)
|
||||
{
|
||||
return __sync_fetch_and_add_si((int *)mem, (int)val);
|
||||
}
|
||||
|
||||
volatile unsigned int x;
|
||||
|
||||
void foo (unsigned short *a)
|
||||
{
|
||||
*a = bar (&x, 1) + 1;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user