This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Call for testers: fix PR 16194
- From: Richard Henderson <rth at redhat dot com>
- To: Joern RENNECKE <joern dot rennecke at st dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, hp at axis dot com
- Date: Mon, 6 Feb 2006 10:58:26 -0800
- Subject: Re: Call for testers: fix PR 16194
- References: <43E12DAC.1090300@st.com>
On Wed, Feb 01, 2006 at 09:52:44PM +0000, Joern RENNECKE wrote:
> +static tree
> +decl_overlaps_hard_reg_set_p (tree *declp, int *walk_subtrees ATTRIBUTE_UNUSED,
> + void *data)
> {
> + tree decl = *declp;
> + const HARD_REG_SET *regs = data;
> +
> if ((TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == PARM_DECL)
> && DECL_REGISTER (decl)
> && REG_P (DECL_RTL (decl))
> @@ -576,31 +580,40 @@ decl_overlaps_hard_reg_set_p (tree decl,
> regno < (REGNO (reg)
> + hard_regno_nregs[REGNO (reg)][GET_MODE (reg)]);
> regno++)
> - if (TEST_HARD_REG_BIT (regs, regno))
> - return true;
> + if (TEST_HARD_REG_BIT (*regs, regno))
> + return decl;
> }
>
> - return false;
> + return NULL_TREE;
> }
Should probably be testing TYPE_P here and declining to walk subtrees.
Otherwise it looks ok.
r~