mirror of git://gcc.gnu.org/git/gcc.git
re PR middle-end/26334 (ICE in lhd_set_decl_assembler_name)
PR middle-end/26334 * stmt.c (decl_overlaps_hard_reg_set_p): Use DECL_HARD_REGISTER instead of DECL_REGISTER. * gcc.c-torture/compile/20060217-1.c: New test. * gcc.dg/20060218-1.c: New test. From-SVN: r111247
This commit is contained in:
parent
3891cee230
commit
3f2de3dcf9
|
@ -1,3 +1,9 @@
|
|||
2006-02-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/26334
|
||||
* stmt.c (decl_overlaps_hard_reg_set_p): Use DECL_HARD_REGISTER
|
||||
instead of DECL_REGISTER.
|
||||
|
||||
2006-02-18 Olivier Hainque <hainque@adacore.com>
|
||||
|
||||
PR ada/13408
|
||||
|
|
|
@ -567,9 +567,9 @@ decl_overlaps_hard_reg_set_p (tree *declp, int *walk_subtrees ATTRIBUTE_UNUSED,
|
|||
tree decl = *declp;
|
||||
const HARD_REG_SET *regs = data;
|
||||
|
||||
if (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == PARM_DECL)
|
||||
if (TREE_CODE (decl) == VAR_DECL)
|
||||
{
|
||||
if (DECL_REGISTER (decl)
|
||||
if (DECL_HARD_REGISTER (decl)
|
||||
&& REG_P (DECL_RTL (decl))
|
||||
&& REGNO (DECL_RTL (decl)) < FIRST_PSEUDO_REGISTER)
|
||||
{
|
||||
|
@ -585,7 +585,7 @@ decl_overlaps_hard_reg_set_p (tree *declp, int *walk_subtrees ATTRIBUTE_UNUSED,
|
|||
}
|
||||
walk_subtrees = 0;
|
||||
}
|
||||
else if (TYPE_P (decl))
|
||||
else if (TYPE_P (decl) || TREE_CODE (decl) == PARM_DECL)
|
||||
walk_subtrees = 0;
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2006-02-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/26334
|
||||
* gcc.c-torture/compile/20060217-1.c: New test.
|
||||
* gcc.dg/20060218-1.c: New test.
|
||||
|
||||
2006-02-18 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
* gcc.dg/glibc-uclibc-1.c, gcc.dg/glibc-uclibc-2.c: New tests.
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/* PR middle-end/26334 */
|
||||
|
||||
struct U
|
||||
{
|
||||
unsigned int u[256];
|
||||
};
|
||||
|
||||
struct S
|
||||
{
|
||||
int u, v, w, x;
|
||||
int s[255];
|
||||
};
|
||||
|
||||
int
|
||||
foo (struct U *x, struct S *y)
|
||||
{
|
||||
register int i;
|
||||
for (i = 0; i < 255; i++)
|
||||
{
|
||||
unsigned int v;
|
||||
__asm__ ("" : "=r" (v) : "0" (x->u[i + 1]) : "cc");
|
||||
y->s[i] = v;
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
/* { dg-do compile } */
|
||||
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
register int cc __asm ("cc"); /* { dg-error "invalid register name" } */
|
||||
__asm ("" : : "r" (cc) : "cc");
|
||||
}
|
Loading…
Reference in New Issue