From 6c4ffa6c4a5ff7a46e1bd4b628d29828a77e1704 Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Thu, 22 Jan 2015 11:55:33 +0000 Subject: [PATCH] make fold ignore decl_with_vis.symtab_node gcc/ PR middle-end/63325 * fold-const.c (fold_checksum_tree): Don't include expr.decl_with_vis.symtab_node in the checksum. From-SVN: r219994 --- gcc/ChangeLog | 6 ++++++ gcc/fold-const.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d060dfae047..d9c1258e22f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-01-22 Trevor Saunders + + PR middle-end/63325 + * fold-const.c (fold_checksum_tree): Don't include value of + expr->decl_with_vis.symtab_node in the checksum. + 2015-01-22 Andreas Krebbel * config/s390/s390.md (atomic code attribute): Fix typo "ior" -> diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 8974dc0b91a..50a987771ab 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -14073,11 +14073,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.30.2