This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Call for testers: fix PR 16194


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]