On Wed, Sep 19, 2018 at 05:07:34PM +0200, Andreas Schwab wrote:
> On Sep 19 2018, Marek Polacek <pola...@redhat.com> wrote:
> 
> > 2018-09-19  Marek Polacek  <pola...@redhat.com>
> >
> >     * class.c (build_vtbl_initializer): Don't mess with *inits for
> >     TARGET_VTABLE_USES_DESCRIPTORS.
> >
> > diff --git gcc/cp/class.c gcc/cp/class.c
> > index 9ca46441871..0239f6ae045 100644
> > --- gcc/cp/class.c
> > +++ gcc/cp/class.c
> > @@ -9370,7 +9370,7 @@ build_vtbl_initializer (tree binfo,
> >       int i;
> >       if (init == size_zero_node)
> >         for (i = 0; i < TARGET_VTABLE_USES_DESCRIPTORS; ++i)
> > -         CONSTRUCTOR_APPEND_ELT (*inits, idx, init);
> > +         CONSTRUCTOR_APPEND_ELT (*inits, NULL_TREE, init);
> >       else
> >         for (i = 0; i < TARGET_VTABLE_USES_DESCRIPTORS; ++i)
> >           {
> > @@ -9378,7 +9378,7 @@ build_vtbl_initializer (tree binfo,
> >                                  fn, build_int_cst (NULL_TREE, i));
> >             TREE_CONSTANT (fdesc) = 1;
> >  
> > -           CONSTRUCTOR_APPEND_ELT (*inits, idx, fdesc);
> > +           CONSTRUCTOR_APPEND_ELT (*inits, NULL_TREE, fdesc);
> >           }
> >     }
> >        else
> 
> Thanks, that works.

Great.  Jason, can I commit it then?

Marek

Reply via email to