On Fri, May 3, 2019 at 6:41 PM H.J. Lu <hjl.to...@gmail.com> wrote: > > 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.
OK. > * 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 >