From: Marek Polacek Date: Thu, 30 Apr 2015 17:25:55 +0000 (+0000) Subject: * varasm.c (handle_cache_entry): Fix logic. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1c3289cd615ce4a38c4a54d69ebfa5ebc47685ca;p=gcc.git * varasm.c (handle_cache_entry): Fix logic. From-SVN: r222641 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d24460f90b1..9f5cab0db22 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2015-04-30 Marek Polacek + + * varasm.c (handle_cache_entry): Fix logic. + 2015-04-30 Kyrylo Tkachov * config/aarch64/aarch64.md (*extr5_insn_alt): New pattern. diff --git a/gcc/varasm.c b/gcc/varasm.c index 9131e83a3bd..c2b35fd9c38 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -5793,21 +5793,20 @@ struct tm_clone_hasher : ggc_cache_hasher static hashval_t hash (tree_map *m) { return tree_map_hash (m); } static bool equal (tree_map *a, tree_map *b) { return tree_map_eq (a, b); } - static void handle_cache_entry (tree_map *&e) + static void + handle_cache_entry (tree_map *&e) { - if (e != HTAB_EMPTY_ENTRY || e != HTAB_DELETED_ENTRY) - { - extern void gt_ggc_mx (tree_map *&); - if (ggc_marked_p (e->base.from)) - gt_ggc_mx (e); - else - e = static_cast (HTAB_DELETED_ENTRY); - } + extern void gt_ggc_mx (tree_map *&); + if (e == HTAB_EMPTY_ENTRY || e == HTAB_DELETED_ENTRY) + return; + else if (ggc_marked_p (e->base.from)) + gt_ggc_mx (e); + else + e = static_cast (HTAB_DELETED_ENTRY); } }; -static GTY((cache)) - hash_table *tm_clone_hash; +static GTY((cache)) hash_table *tm_clone_hash; void record_tm_clone_pair (tree o, tree n)