On Thu, Jan 22, 2015 at 06:02:06AM -0500, tbsaunde+...@tbsaunde.org wrote:
> 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.

Ok, thanks.

> --- 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;

Wonder why we don't have an accessor macro for this in tree.h.
decl_with_vis is implementation detail.

        Jakub

Reply via email to