This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR63229] fix assert in hash_table pch routines
- From: Trevor Saunders <tsaunders at mozilla dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at arm dot com
- Date: Tue, 23 Sep 2014 03:18:47 -0400
- Subject: Re: [PATCH, PR63229] fix assert in hash_table pch routines
- Authentication-results: sourceware.org; auth=none
- References: <1410525265-18003-1-git-send-email-tsaunders at mozilla dot com> <87tx43nc34 dot fsf at e105548-lin dot cambridge dot arm dot com>
On Fri, Sep 19, 2014 at 11:23:11AM +0100, Richard Sandiford wrote:
> tsaunders@mozilla.com writes:
> > diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> > index c048672..5b27aa8 100644
> > --- a/gcc/ChangeLog
> > +++ b/gcc/ChangeLog
> > @@ -1,3 +1,8 @@
> > +2014-09-12 Trevor Saunders <tsaunders@mozilla.com>
> > +
> > + * hash-table.h (gt_pch_nx): don't call gt_pch_note_object within an
> > + assert.
> > +
> > 2014-09-12 Joseph Myers <joseph@codesourcery.com>
> >
> > * target.def (libgcc_floating_mode_supported_p): New hook.
> > diff --git a/gcc/hash-table.h b/gcc/hash-table.h
> > index c2a68fd..028b7de 100644
> > --- a/gcc/hash-table.h
> > +++ b/gcc/hash-table.h
> > @@ -1598,8 +1598,9 @@ template<typename D>
> > static void
> > gt_pch_nx (hash_table<D> *h)
> > {
> > - gcc_checking_assert (gt_pch_note_object (h->m_entries, h,
> > - hashtab_entry_note_pointers<D>));
> > + bool success ATTRIBUTE_UNUSED
> > + = gt_pch_note_object (h->m_entries, h, hashtab_entry_note_pointers<D>);
> > + gcc_checking_assert (success);
>
> Do we need ATTRIBUTE_UNUSED here? I thought we tried to define
> gcc_checking_assert so that its argument appeared used even when
> asserts were disabled.
huh, seems so. I'm about to send more patches touching gc hash tables,
so I'll just fold cleaning this up into them.
Trev
>
> (Sorry for the nit.)
>
> Thanks,
> Richard
>