simplify_vector_constructor has

  constructor_elt *elt;
...
  FOR_EACH_VEC_SAFE_ELT (CONSTRUCTOR_ELTS (op), i, elt)
    {
      ...
      unsigned int elt;
      ...
    }

This patch renames the second elt to elem to avoid shadowing the first
elt.

        * tree-ssa-forwprop.c (simplify_vector_constructor): Rename the
        second elt to elem to avoid shadowing the first elt.
---
 gcc/tree-ssa-forwprop.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index 7dd1e64335a..ab27a5ddbb1 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -2101,15 +2101,16 @@ simplify_vector_constructor (gimple_stmt_iterator *gsi)
          if (j == 2)
            return false;
 
-         unsigned int elt;
+         unsigned int elem;
          if (maybe_ne (bit_field_size (op1), elem_size)
-             || !constant_multiple_p (bit_field_offset (op1), elem_size, &elt))
+             || !constant_multiple_p (bit_field_offset (op1), elem_size,
+                                      &elem))
            return false;
          if (j)
-           elt += nelts;
-         if (elt != i)
+           elem += nelts;
+         if (elem != i)
            maybe_ident = false;
-         sel.quick_push (elt);
+         sel.quick_push (elem);
        }
       else if (CONSTANT_CLASS_P (elt->value))
        {
-- 
2.20.1

Reply via email to