From: Andrew Pinski Date: Sun, 13 Jun 2004 22:15:51 +0000 (+0000) Subject: fold-const.c (fold_checksum_tree ): Only look at TREE_VALUES if the EXPR... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a40de696ac0207908f22b2b50330e22e86e45329;p=gcc.git fold-const.c (fold_checksum_tree ): Only look at TREE_VALUES if the EXPR is an ENUMERAL_TYPE. 2004-06-13 Andrew Pinski * fold-const.c (fold_checksum_tree ): Only look at TREE_VALUES if the EXPR is an ENUMERAL_TYPE. Only look at TYPE_MIN_VALUE and TYPE_MAX_VALUE if EXPR is an INTEGERAL_TYPE or a scalar float type. From-SVN: r83068 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6e42d5920e8..8ec2db59619 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-06-13 Andrew Pinski + + * fold-const.c (fold_checksum_tree ): Only + look at TREE_VALUES if the EXPR is an ENUMERAL_TYPE. + Only look at TYPE_MIN_VALUE and TYPE_MAX_VALUE if + EXPR is an INTEGERAL_TYPE or a scalar float type. + 2004-06-13 Diego Novillo * tree-sra.c (tree_sra): Update documentation. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 02f4128af49..1cc2b8189c8 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -8731,13 +8731,18 @@ fold_checksum_tree (tree expr, struct md5_ctx *ctx, htab_t ht) fold_checksum_tree (DECL_VINDEX (expr), ctx, ht); break; case 't': - fold_checksum_tree (TYPE_VALUES (expr), ctx, ht); + if (TREE_CODE (expr) == ENUMERAL_TYPE) + fold_checksum_tree (TYPE_VALUES (expr), ctx, ht); fold_checksum_tree (TYPE_SIZE (expr), ctx, ht); fold_checksum_tree (TYPE_SIZE_UNIT (expr), ctx, ht); fold_checksum_tree (TYPE_ATTRIBUTES (expr), ctx, ht); fold_checksum_tree (TYPE_NAME (expr), ctx, ht); - fold_checksum_tree (TYPE_MIN_VALUE (expr), ctx, ht); - fold_checksum_tree (TYPE_MAX_VALUE (expr), ctx, ht); + if (INTEGRAL_TYPE_P (expr) + || SCALAR_FLOAT_TYPE_P (expr)) + { + fold_checksum_tree (TYPE_MIN_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_BINFO (expr), ctx, ht); fold_checksum_tree (TYPE_CONTEXT (expr), ctx, ht);