Mercurial > hg > CbC > CbC_gcc
diff gcc/hash-table.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line diff
--- a/gcc/hash-table.c Thu Oct 25 07:37:49 2018 +0900 +++ b/gcc/hash-table.c Thu Feb 13 11:34:05 2020 +0900 @@ -1,5 +1,5 @@ /* A type-safe hash table template. - Copyright (C) 2012-2018 Free Software Foundation, Inc. + Copyright (C) 2012-2020 Free Software Foundation, Inc. Contributed by Lawrence Crowl <crowl@google.com> This file is part of GCC. @@ -74,8 +74,11 @@ { 0xfffffffb, 0x00000006, 0x00000008, 31 } }; +/* Limit number of comparisons when calling hash_table<>::verify. */ +unsigned int hash_table_sanitize_eq_limit; + /* The following function returns an index into the above table of the - nearest prime number which is greater than N, and near a power of two. */ + nearest prime number which is at least N, and near a power of two. */ unsigned int hash_table_higher_prime_index (unsigned long n) @@ -121,3 +124,15 @@ 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 (); +}