mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-21 15:41:09 +08:00
re PR tree-optimization/20204 (miscompilation of asm-declared registers)
PR tree-optimization/20204 * tree-into-ssa.c (insert_phi_nodes_for): Do not use REWRITE_THIS_STMT markers on PHI nodes. (rewrite_initialize_block): Likewise. testsuite/ChangeLog PR tree-optimization/20204 * testsuite/gcc.dg/pr20204.c: New test. From-SVN: r95547
This commit is contained in:
parent
3bf4da728f
commit
736c86ad83
@ -1,3 +1,10 @@
|
||||
2005-02-25 Diego Novillo <dnovillo@redhat.com>
|
||||
|
||||
PR tree-optimization/20204
|
||||
* tree-into-ssa.c (insert_phi_nodes_for): Do not use
|
||||
REWRITE_THIS_STMT markers on PHI nodes.
|
||||
(rewrite_initialize_block): Likewise.
|
||||
|
||||
2005-02-25 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* version.c (version_string): Update to 4.1.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-02-25 Diego Novillo <dnovillo@redhat.com>
|
||||
|
||||
PR tree-optimization/20204
|
||||
* testsuite/gcc.dg/pr20204.c: New test.
|
||||
|
||||
2005-02-24 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/20196
|
||||
|
34
gcc/testsuite/gcc.dg/pr20204.c
Normal file
34
gcc/testsuite/gcc.dg/pr20204.c
Normal file
@ -0,0 +1,34 @@
|
||||
/* { dg-do run { target i?86-*-* } } */
|
||||
/* { dg-options "-O2" } */
|
||||
|
||||
void *x (void *pdst, const void *psrc, unsigned int pn)
|
||||
{
|
||||
register void *return_dst = pdst;
|
||||
register unsigned char *dst = pdst;
|
||||
register unsigned const char *src = psrc;
|
||||
register int n __asm__ ("ebx") = pn;
|
||||
|
||||
if (src < dst && dst < src + n)
|
||||
{
|
||||
src += n;
|
||||
dst += n;
|
||||
while (n--)
|
||||
*--dst = *--src;
|
||||
return return_dst;
|
||||
}
|
||||
|
||||
while (n >= 16) n--;
|
||||
|
||||
return return_dst;
|
||||
}
|
||||
extern void abort ();
|
||||
extern void exit (int);
|
||||
char xx[30] = "abc";
|
||||
int main (void)
|
||||
{
|
||||
char yy[30] = "aab";
|
||||
|
||||
if (x (xx + 1, xx, 2) != xx + 1 || memcmp (xx, yy, sizeof (yy)) != 0)
|
||||
abort ();
|
||||
exit (0);
|
||||
}
|
@ -591,9 +591,6 @@ insert_phi_nodes_for (tree var, bitmap phi_insertion_points)
|
||||
FOR_EACH_EDGE (e, ei, bb->preds)
|
||||
add_phi_arg (phi, var, e);
|
||||
}
|
||||
|
||||
/* Mark this PHI node as interesting for the rename process. */
|
||||
REWRITE_THIS_STMT (phi) = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -745,8 +742,7 @@ rewrite_initialize_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
|
||||
for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
|
||||
{
|
||||
tree result = PHI_RESULT (phi);
|
||||
if (REWRITE_THIS_STMT (phi))
|
||||
register_new_def (result, &block_defs_stack);
|
||||
register_new_def (result, &block_defs_stack);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user