From 3f2de3dcf930e5fb85df3d6f89a6faac8d6c5367 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 18 Feb 2006 19:58:42 +0100 Subject: 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 --- gcc/stmt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/stmt.c') diff --git a/gcc/stmt.c b/gcc/stmt.c index be19216..38a7f90 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -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; } -- cgit v1.1