+2004-06-13 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * fold-const.c (fold_checksum_tree <case 't'>): 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 <dnovillo@redhat.com>
* tree-sra.c (tree_sra): Update documentation.
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);