Fix shadowing in globalize_reg
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 2 Oct 2019 13:12:37 +0000 (13:12 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 2 Oct 2019 13:12:37 +0000 (13:12 +0000)
2019-10-02  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* reginfo.c (globalize_reg): Fix shadowed variable in
function_abis walk.

From-SVN: r276457

gcc/ChangeLog
gcc/reginfo.c

index 7b5777e37d0dfb670663e1e9a2bafa00c2306d97..f9cc2d634d4aba41b3309e0dafc925eaa01851f8 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-02  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * reginfo.c (globalize_reg): Fix shadowed variable in
+       function_abis walk.
+
 2019-10-02  Martin Jambor  <mjambor@suse.cz>
 
        * cgraph.c (symbol_table::create_edge): New parameter cloning_p,
index 6bed844ac94fb65d17dab9bd464df3890c97f9a3..9813bab025c632b90d6f02d97aad53ce467e098c 100644 (file)
@@ -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.  */