Hi, while working on incremental WHOPR with Michal Jires, we noticed that there is code hashing LABEL_DECL_UID in lto-streamer-out which would break the hash table, since label decls are not streamed and gets re-initialized later.
The whole conditional is dead since LABEL_DECLs are not merged across TUs. ltobootstrapped/regtested x86_64-linux, plan to commit it shortly. gcc/ChangeLog: * lto-streamer-out.cc (hash_tree): Remove dead handling of LABEL_DECL. gcc/lto/ChangeLog: * lto-common.cc (compare_tree_sccs_1): Remove dead handling of LABEL_DECL. diff --git a/gcc/lto-streamer-out.cc b/gcc/lto-streamer-out.cc index 0bca530313c..27f9edd3fcd 100644 --- a/gcc/lto-streamer-out.cc +++ b/gcc/lto-streamer-out.cc @@ -1268,12 +1268,8 @@ hash_tree (struct streamer_tree_cache_d *cache, hash_map<tree, hashval_t> *map, hstate.add_flag (DECL_NOT_GIMPLE_REG_P (t)); hstate.commit_flag (); hstate.add_int (DECL_ALIGN (t)); - if (code == LABEL_DECL) - { - hstate.add_int (EH_LANDING_PAD_NR (t)); - hstate.add_int (LABEL_DECL_UID (t)); - } - else if (code == FIELD_DECL) + gcc_checking_assert (code != LABEL_DECL); + if (code == FIELD_DECL) { hstate.add_flag (DECL_PACKED (t)); hstate.add_flag (DECL_NONADDRESSABLE_P (t)); diff --git a/gcc/lto/lto-common.cc b/gcc/lto/lto-common.cc index 882dd8971a4..597fc5dbabf 100644 --- a/gcc/lto/lto-common.cc +++ b/gcc/lto/lto-common.cc @@ -1180,12 +1180,8 @@ compare_tree_sccs_1 (tree t1, tree t2, tree **map) compare_values (DECL_EXTERNAL); compare_values (DECL_NOT_GIMPLE_REG_P); compare_values (DECL_ALIGN); - if (code == LABEL_DECL) - { - compare_values (EH_LANDING_PAD_NR); - compare_values (LABEL_DECL_UID); - } - else if (code == FIELD_DECL) + gcc_checking_assert (code != LABEL_DECL); + if (code == FIELD_DECL) { compare_values (DECL_PACKED); compare_values (DECL_NONADDRESSABLE_P);