mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-10 21:41:14 +08:00
re PR rtl-optimization/17825 (ICE in reg_bitfield_target_p)
PR rtl-optimization/17825 * combine.c (subst): Ignore STRICT_LOW_PART no matter if REG_P (new) or not. * gcc.c-torture/compile/20041119-1.c: New test. From-SVN: r91369
This commit is contained in:
parent
fcfbdb74da
commit
b78b8bd83e
@ -1,3 +1,9 @@
|
||||
2004-11-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/17825
|
||||
* combine.c (subst): Ignore STRICT_LOW_PART no matter if REG_P (new)
|
||||
or not.
|
||||
|
||||
2004-11-27 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR target/12769
|
||||
|
@ -3556,10 +3556,10 @@ subst (rtx x, rtx from, rtx to, int in_dest, int unique_copy)
|
||||
/* If this is a register being set, ignore it. */
|
||||
new = XEXP (x, i);
|
||||
if (in_dest
|
||||
&& (code == SUBREG || code == STRICT_LOW_PART
|
||||
|| code == ZERO_EXTRACT)
|
||||
&& i == 0
|
||||
&& REG_P (new))
|
||||
&& (((code == SUBREG || code == ZERO_EXTRACT)
|
||||
&& REG_P (new))
|
||||
|| code == STRICT_LOW_PART))
|
||||
;
|
||||
|
||||
else if (COMBINE_RTX_EQUAL_P (XEXP (x, i), from))
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-11-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR rtl-optimization/17825
|
||||
* gcc.c-torture/compile/20041119-1.c: New test.
|
||||
|
||||
2004-11-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
* lib/target-libpath.exp (restore_ld_library_path_env_vars):
|
||||
|
30
gcc/testsuite/gcc.c-torture/compile/20041119-1.c
Normal file
30
gcc/testsuite/gcc.c-torture/compile/20041119-1.c
Normal file
@ -0,0 +1,30 @@
|
||||
/* PR rtl-optimization/17825 */
|
||||
#ifdef __i386__
|
||||
register unsigned int reg __asm ("esi");
|
||||
#elif defined __x86_64__
|
||||
register unsigned int reg __asm ("r14");
|
||||
#else
|
||||
unsigned int reg;
|
||||
#endif
|
||||
|
||||
struct S
|
||||
{
|
||||
unsigned int h[8];
|
||||
} *b;
|
||||
unsigned int c;
|
||||
void foo (int);
|
||||
|
||||
void
|
||||
bar (void)
|
||||
{
|
||||
unsigned int j, k, l, m;
|
||||
|
||||
j = (reg & 0xffff) | ((b->h[2] & 0xffff) << 16);
|
||||
k = c & 0xffff;
|
||||
if (k == 0)
|
||||
foo (0);
|
||||
l = (j / k) & 0xffff;
|
||||
m = (j % k) & 0xffff;
|
||||
reg = (reg & 0xffff0000) | l;
|
||||
b->h[2] = (b->h[2] & 0xffff0000) | m;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user