This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, PR63229] fix assert in hash_table pch routines
- From: tsaunders at mozilla dot com
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 12 Sep 2014 08:34:14 -0400
- Subject: [PATCH, PR63229] fix assert in hash_table pch routines
- Authentication-results: sourceware.org; auth=none
From: tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>
Hi,
should be obvious changing things within an assert is a bad idea, but somehow I forgot :(
tested x86_64-unknown-linux-gnu, and commited as obvious.
Trev
gcc/ChangeLog:
2014-09-12 Trevor Saunders <tsaunders@mozilla.com>
* hash-table.h (gt_pch_nx): Don't call gt_pch_note_object within an
assert.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215216 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/ChangeLog | 5 +++++
gcc/hash-table.h | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
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);
for (size_t i = 0; i < h->m_size; i++)
{
if (hash_table<D>::is_empty (h->m_entries[i])
--
2.1.0