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: [01/32] Add function_abi.{h,cc}


Hi,

I am currently trying to implement -Wshadow=local, and
this patch triggers a build-failure with -Wshadow=local
since i is a parameter that is the regno.
But it is also used as loop variable,
so I think this introduces probably a bug:

> @@ -728,7 +731,11 @@ globalize_reg (tree decl, int i)
>       appropriate regs_invalidated_by_call bit, even if it's already
>       set in fixed_regs.  */
>    if (i != STACK_POINTER_REGNUM)
> -    SET_HARD_REG_BIT (regs_invalidated_by_call, i);
> +    {
> +      SET_HARD_REG_BIT (regs_invalidated_by_call, i);
> +      for (unsigned int i = 0; i < NUM_ABI_IDS; ++i)
> +	function_abis[i].add_full_reg_clobber (i);
> +    }


I would think you meant:

for (unsigned int j = 0; j < NUM_ABI_IDS; ++j)
  function_abis[j].add_full_reg_clobber (i);

Right?

Thanks
Bernd.


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