From 190c11dc2e2af9374a032a3f85931ef6a655fab1 Mon Sep 17 00:00:00 2001 From: rsandifo Date: Wed, 2 Oct 2019 13:12:37 +0000 Subject: [PATCH] Fix shadowing in globalize_reg 2019-10-02 Richard Sandiford gcc/ * reginfo.c (globalize_reg): Fix shadowed variable in function_abis walk. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276457 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/reginfo.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7b5777e37d0d..f9cc2d634d4a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-02 Richard Sandiford + + * reginfo.c (globalize_reg): Fix shadowed variable in + function_abis walk. + 2019-10-02 Martin Jambor * cgraph.c (symbol_table::create_edge): New parameter cloning_p, diff --git a/gcc/reginfo.c b/gcc/reginfo.c index 6bed844ac94f..9813bab025c6 100644 --- a/gcc/reginfo.c +++ b/gcc/reginfo.c @@ -731,8 +731,8 @@ globalize_reg (tree decl, int i) if (i != STACK_POINTER_REGNUM) { 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); + for (unsigned int j = 0; j < NUM_ABI_IDS; ++j) + function_abis[j].add_full_reg_clobber (i); } /* If already fixed, nothing else to do. */ -- 2.47.2