From: Martin Liska Date: Wed, 31 Oct 2018 10:59:34 +0000 (+0100) Subject: Fix hash-table violation in trans-decl.c. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e71b5714df37470cbfa44eb1faefd4e1bc22648;p=gcc.git Fix hash-table violation in trans-decl.c. 2018-10-31 Martin Liska * trans-decl.c (struct module_hasher): Call htab_hash_string for s->name and not for s. From-SVN: r265663 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1186a40e4b5..e6e350d8bd1 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2018-10-31 Martin Liska + + * trans-decl.c (struct module_hasher): Call htab_hash_string + for s->name and not for s. + 2018-10-30 Thomas Koenig PR fortran/85896 diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 88f9f570725..83cbcd123fe 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -4825,7 +4825,11 @@ struct module_hasher : ggc_ptr_hash { typedef const char *compare_type; - static hashval_t hash (module_htab_entry *s) { return htab_hash_string (s); } + static hashval_t hash (module_htab_entry *s) + { + return htab_hash_string (s->name); + } + static bool equal (module_htab_entry *a, const char *b) {