This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [01/32] Add function_abi.{h,cc}
- From: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- To: Richard Sandiford <rdsandiford at googlemail dot com>, Jeff Law <law at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 1 Oct 2019 19:03:34 +0000
- Subject: Re: [01/32] Add function_abi.{h,cc}
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tGvrfOwP4HZmTCqGsrctrW2uAsC76iOWhqjX/w+hT38=; b=LpPckZLfSwiJ/AE9bbvlsWcBKi30WrsKLaA5LG+FcbZk5t7ijO++Q8S1MuJXtfX8rajdPHCwenI69olxJCoj/1D/DIe0Epqh4QP1u8srUMnebP61GoAgcbVWZYcfqqLNwdRPNWu2IHbY2vJR4PHtCrWshLFzMc5ikRTtNrH3GE6WG3iFm6K5KQF964l7AtqtSo8JoCPgwTBibsjN3Osq+EPsRA+wD0X6d8TgU6+oe6j1o9m2erVXPPnq1n6LN0Ijd8bresJicqnaSG4r8KhTUrZXGFAoNO1UrBKWHGBccA+uysRw6MdptQg2fu0PZaj/O2XNsKUtc5N2+uoAq+uW5w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Na5EE9QLIDLoYqE0CjO33dFhvLOBrp0dFRW9vq9wxMb+Qm12ShogGvt9rLFrPK8DJ9zcl+A393MooRiHZNK1ZjBnxe8ru9Rjr0/B814l781yxcn7116AccUZvVxWxUbukY0YQUDbG36tk1D6LG4dZ8M5gIArMISPjNRZ+Qv2d33pkugBLjCDFLjR0g9aI0juglreXTi24iHJWTojNZHFM2v6eVcIWmToXcjO9Jimwsu3Ctz5xckEUMTmiLWNGYmGm+AWMjx/hVv/JqwrB/xIbXjb9I05oBoswokNnzRX1BsMlmZgYZ4BZ4QAeu5KV8AoTVcukRYuZzqUu7ioGyBE0A==
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.