From: Daniel Jacobowitz Date: Mon, 13 Sep 2004 23:25:45 +0000 (+0000) Subject: fold-const.c (fold_checksum_tree): Ignore TYPE_CACHED_VALUES. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9193259853a2dcb515ba53a77836efa2b6ecc97;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 419c409633c..cc493a4c5ff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-09-13 Daniel Jacobowitz + + * fold-const.c (fold_checksum_tree): Ignore TYPE_CACHED_VALUES. + Only use TYPE_BINFO for aggregates. + 2004-09-13 Daniel Jacobowitz * expmed.c (synth_mult): Initialize latency. Check cost before diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 972f276d59c..4453f364233 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -9051,13 +9051,16 @@ fold_checksum_tree (tree expr, struct md5_ctx *ctx, htab_t ht) SET_DECL_ASSEMBLER_NAME (expr, NULL); } 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)); expr = (tree) buf; TYPE_POINTER_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); 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_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); break; default: