Commit 0607953c by Jakub Jelinek Committed by Jakub Jelinek

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
parent e99af66b
2001-04-25 Jakub Jelinek <jakub@redhat.com> 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 * config/i386/i386.c (ix86_expand_int_movcc): If overlap between
out and comparison sequence has been detected, put result into out and comparison sequence has been detected, put result into
proper temporary pseudo. proper temporary pseudo.
......
...@@ -719,7 +719,7 @@ subreg_hard_regno (x, check_mode) ...@@ -719,7 +719,7 @@ subreg_hard_regno (x, check_mode)
base_regno = REGNO (reg); base_regno = REGNO (reg);
if (base_regno >= FIRST_PSEUDO_REGISTER) if (base_regno >= FIRST_PSEUDO_REGISTER)
abort (); abort ();
if (! HARD_REGNO_MODE_OK (base_regno, GET_MODE (reg))) if (check_mode && ! HARD_REGNO_MODE_OK (base_regno, GET_MODE (reg)))
abort (); abort ();
/* Catch non-congruent offsets too. */ /* Catch non-congruent offsets too. */
......
2001-04-25 Jakub Jelinek <jakub@redhat.com> 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. * gcc.c-torture/execute/20010422-1.c: New test.
2001-04-25 Nathan Sidwell <nathan@codesourcery.com> 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
......
/* { 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;
}
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