Commit f798226d by Richard Guenther Committed by Richard Biener

gimple.c (iterative_hash_gimple_type): For integer types also hash their minimum…

gimple.c (iterative_hash_gimple_type): For integer types also hash their minimum and maximum values and the string flag.

2009-10-16  Richard Guenther  <rguenther@suse.de>

	* gimple.c (iterative_hash_gimple_type): For integer types
	also hash their minimum and maximum values and the string flag.
	For array types hash their domain and the string flag.

From-SVN: r152899
parent 021ed367
2009-10-16 Richard Guenther <rguenther@suse.de> 2009-10-16 Richard Guenther <rguenther@suse.de>
* gimple.c (iterative_hash_gimple_type): For integer types
also hash their minimum and maximum values and the string flag.
For array types hash their domain and the string flag.
2009-10-16 Richard Guenther <rguenther@suse.de>
* gimple.c (gimple_types_compatible_p): Restrict completing * gimple.c (gimple_types_compatible_p): Restrict completing
types to record or unions. Simplify completion. types to record or unions. Simplify completion.
Do not merge records or unions with different Do not merge records or unions with different
...@@ -3688,7 +3688,24 @@ iterative_hash_gimple_type (tree type, hashval_t val, ...@@ -3688,7 +3688,24 @@ iterative_hash_gimple_type (tree type, hashval_t val,
sccstack, sccstate, sccstate_obstack); sccstack, sccstate, sccstate_obstack);
} }
/* Recurse for aggregates with a single element. */ /* For integer types hash the types min/max values and the string flag. */
if (TREE_CODE (type) == INTEGER_TYPE)
{
v = iterative_hash_expr (TYPE_MIN_VALUE (type), v);
v = iterative_hash_expr (TYPE_MAX_VALUE (type), v);
v = iterative_hash_hashval_t (TYPE_STRING_FLAG (type), v);
}
/* For array types hash their domain and the string flag. */
if (TREE_CODE (type) == ARRAY_TYPE
&& TYPE_DOMAIN (type))
{
v = iterative_hash_hashval_t (TYPE_STRING_FLAG (type), v);
v = visit (TYPE_DOMAIN (type), state, v,
sccstack, sccstate, sccstate_obstack);
}
/* Recurse for aggregates with a single element type. */
if (TREE_CODE (type) == ARRAY_TYPE if (TREE_CODE (type) == ARRAY_TYPE
|| TREE_CODE (type) == COMPLEX_TYPE || TREE_CODE (type) == COMPLEX_TYPE
|| TREE_CODE (type) == VECTOR_TYPE) || TREE_CODE (type) == VECTOR_TYPE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment