fold-const.c (fold_checksum_tree): Ignore TYPE_CACHED_VALUES.

* fold-const.c (fold_checksum_tree): Ignore TYPE_CACHED_VALUES.
	Only use TYPE_BINFO for aggregates.

From-SVN: r87457
This commit is contained in:
Daniel Jacobowitz 2004-09-13 23:25:45 +00:00 committed by Daniel Jacobowitz
parent 3ab0f29005
commit b919325985
2 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2004-09-13 Daniel Jacobowitz <dan@debian.org>
* fold-const.c (fold_checksum_tree): Ignore TYPE_CACHED_VALUES.
Only use TYPE_BINFO for aggregates.
2004-09-13 Daniel Jacobowitz <dan@debian.org> 2004-09-13 Daniel Jacobowitz <dan@debian.org>
* expmed.c (synth_mult): Initialize latency. Check cost before * expmed.c (synth_mult): Initialize latency. Check cost before

View File

@ -9051,13 +9051,16 @@ fold_checksum_tree (tree expr, struct md5_ctx *ctx, htab_t ht)
SET_DECL_ASSEMBLER_NAME (expr, NULL); SET_DECL_ASSEMBLER_NAME (expr, NULL);
} }
else if (TREE_CODE_CLASS (code) == 't' else if (TREE_CODE_CLASS (code) == 't'
&& (TYPE_POINTER_TO (expr) || TYPE_REFERENCE_TO (expr))) && (TYPE_POINTER_TO (expr) || TYPE_REFERENCE_TO (expr)
|| TYPE_CACHED_VALUES_P (expr)))
{ {
/* Allow TYPE_POINTER_TO and TYPE_REFERENCE_TO to be modified. */ /* Allow these fields to be modified. */
memcpy (buf, expr, tree_size (expr)); memcpy (buf, expr, tree_size (expr));
expr = (tree) buf; expr = (tree) buf;
TYPE_POINTER_TO (expr) = NULL; TYPE_POINTER_TO (expr) = NULL;
TYPE_REFERENCE_TO (expr) = NULL; TYPE_REFERENCE_TO (expr) = NULL;
TYPE_CACHED_VALUES_P (expr) = 0;
TYPE_CACHED_VALUES (expr) = NULL;
} }
md5_process_bytes (expr, tree_size (expr), ctx); md5_process_bytes (expr, tree_size (expr), ctx);
fold_checksum_tree (TREE_TYPE (expr), ctx, ht); fold_checksum_tree (TREE_TYPE (expr), ctx, ht);
@ -9135,7 +9138,10 @@ fold_checksum_tree (tree expr, struct md5_ctx *ctx, htab_t ht)
fold_checksum_tree (TYPE_MAX_VALUE (expr), ctx, ht); fold_checksum_tree (TYPE_MAX_VALUE (expr), ctx, ht);
} }
fold_checksum_tree (TYPE_MAIN_VARIANT (expr), ctx, ht); fold_checksum_tree (TYPE_MAIN_VARIANT (expr), ctx, ht);
fold_checksum_tree (TYPE_BINFO (expr), ctx, ht); if (TREE_CODE (expr) == RECORD_TYPE
|| TREE_CODE (expr) == UNION_TYPE
|| TREE_CODE (expr) == QUAL_UNION_TYPE)
fold_checksum_tree (TYPE_BINFO (expr), ctx, ht);
fold_checksum_tree (TYPE_CONTEXT (expr), ctx, ht); fold_checksum_tree (TYPE_CONTEXT (expr), ctx, ht);
break; break;
default: default: