Commit 27bb6f7c by Martin Liska Committed by Martin Liska

Put hashtab_chk_error into hash-table.c.

2019-06-25  Martin Liska  <mliska@suse.cz>

	* hash-table.c (hashtab_chk_error): Move here from ...
	* hash-table.h (hashtab_chk_error): ... here.

From-SVN: r272655
parent bc2687dd
2019-06-25 Martin Liska <mliska@suse.cz> 2019-06-25 Martin Liska <mliska@suse.cz>
* hash-table.c (hashtab_chk_error): Move here from ...
* hash-table.h (hashtab_chk_error): ... here.
2019-06-25 Martin Liska <mliska@suse.cz>
PR tree-optimization/90978 PR tree-optimization/90978
* df-scan.c (df_update_entry_block_defs): Remove dead else * df-scan.c (df_update_entry_block_defs): Remove dead else
branch. branch.
......
...@@ -124,3 +124,15 @@ void dump_hash_table_loc_statistics (void) ...@@ -124,3 +124,15 @@ void dump_hash_table_loc_statistics (void)
hash_table_usage ().dump (origin); hash_table_usage ().dump (origin);
} }
} }
/* Report a hash table checking error. */
ATTRIBUTE_NORETURN ATTRIBUTE_COLD
void
hashtab_chk_error ()
{
fprintf (stderr, "hash table checking failed: "
"equal operator returns true for a pair "
"of values with a different hash value\n");
gcc_unreachable ();
}
...@@ -303,6 +303,8 @@ extern unsigned int hash_table_sanitize_eq_limit; ...@@ -303,6 +303,8 @@ extern unsigned int hash_table_sanitize_eq_limit;
extern unsigned int hash_table_higher_prime_index (unsigned long n) extern unsigned int hash_table_higher_prime_index (unsigned long n)
ATTRIBUTE_PURE; ATTRIBUTE_PURE;
extern ATTRIBUTE_NORETURN ATTRIBUTE_COLD void hashtab_chk_error ();
/* Return X % Y using multiplicative inverse values INV and SHIFT. /* Return X % Y using multiplicative inverse values INV and SHIFT.
The multiplicative inverses computed above are for 32-bit types, The multiplicative inverses computed above are for 32-bit types,
...@@ -1010,18 +1012,6 @@ hash_table<Descriptor, Lazy, Allocator> ...@@ -1010,18 +1012,6 @@ hash_table<Descriptor, Lazy, Allocator>
return &m_entries[index]; return &m_entries[index];
} }
/* Report a hash table checking error. */
ATTRIBUTE_NORETURN ATTRIBUTE_COLD
static void
hashtab_chk_error ()
{
fprintf (stderr, "hash table checking failed: "
"equal operator returns true for a pair "
"of values with a different hash value\n");
gcc_unreachable ();
}
/* Verify that all existing elements in th hash table which are /* Verify that all existing elements in th hash table which are
equal to COMPARABLE have an equal HASH value provided as argument. */ equal to COMPARABLE have an equal HASH value provided as argument. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment