make fold ignore decl_with_vis.symtab_node
authortbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Jan 2015 11:55:33 +0000 (11:55 +0000)
committertbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Jan 2015 11:55:33 +0000 (11:55 +0000)
gcc/

PR middle-end/63325
* fold-const.c (fold_checksum_tree): Don't include
expr.decl_with_vis.symtab_node in the checksum.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219994 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fold-const.c

index d060dfa..d9c1258 100644 (file)
@@ -1,3 +1,9 @@
+2015-01-22  Trevor Saunders  <tsaunders@mozilla.com>
+
+       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  <Andreas.Krebbel@de.ibm.com>
 
        * config/s390/s390.md (atomic code attribute): Fix typo "ior" ->
index 8974dc0..50a9877 100644 (file)
@@ -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