From: Trevor Saunders <tbsaunde+...@tbsaunde.org> Hi,
fold calls symtab_node::get_create () which can change this field from NULL to point to a new object. It doesn't seem to really matter when the object gets created and I don't think it changes any properties of the tree object. So I think it makes sense to do here what we do for similar members and leave it out of the checksum. bootstrapped + regtested x86_64-linux-gnu, ok? Trev gcc/ * fold-const.c (fold_checksum_tree): Don't include expr.decl_with_vis.symtab_node in the checksum. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index b1cbfac..88aa20e 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -14065,11 +14065,12 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx, *slot = expr; code = TREE_CODE (expr); if (TREE_CODE_CLASS (code) == tcc_declaration - && DECL_ASSEMBLER_NAME_SET_P (expr)) + && HAS_DECL_ASSEMBLER_NAME_P (expr)) { - /* Allow DECL_ASSEMBLER_NAME to be modified. */ + /* Allow DECL_ASSEMBLER_NAME and symtab_node to be modified. */ memcpy ((char *) &buf, expr, tree_size (expr)); SET_DECL_ASSEMBLER_NAME ((tree)&buf, NULL); + buf.decl_with_vis.symtab_node = NULL; expr = (tree) &buf; } else if (TREE_CODE_CLASS (code) == tcc_type -- 2.1.4