Commit 1e83b5f1 by Richard Guenther Committed by Richard Biener

gimple.c (iterative_hash_gimple_type): Re-instantiate change to always visit…

gimple.c (iterative_hash_gimple_type): Re-instantiate change to always visit pointer target and function result and...

2011-05-16  Richard Guenther  <rguenther@suse.de>

	* gimple.c (iterative_hash_gimple_type): Re-instantiate
	change to always visit pointer target and function result
	and argument types.

From-SVN: r173794
parent 62e36382
2011-05-16 Richard Guenther <rguenther@suse.de>
* gimple.c (iterative_hash_gimple_type): Re-instantiate
change to always visit pointer target and function result
and argument types.
2011-05-16 Jason Merrill <jason@redhat.com> 2011-05-16 Jason Merrill <jason@redhat.com>
PR c++/48999 PR c++/48999
......
...@@ -4129,20 +4129,10 @@ iterative_hash_gimple_type (tree type, hashval_t val, ...@@ -4129,20 +4129,10 @@ iterative_hash_gimple_type (tree type, hashval_t val,
} }
/* For pointer and reference types, fold in information about the type /* For pointer and reference types, fold in information about the type
pointed to but do not recurse into possibly incomplete types to pointed to. */
avoid hash differences for complete vs. incomplete types. */
if (POINTER_TYPE_P (type)) if (POINTER_TYPE_P (type))
{
if (RECORD_OR_UNION_TYPE_P (TREE_TYPE (type)))
{
v = iterative_hash_hashval_t (TREE_CODE (TREE_TYPE (type)), v);
v = iterative_hash_name
(TYPE_NAME (TYPE_MAIN_VARIANT (TREE_TYPE (type))), v);
}
else
v = visit (TREE_TYPE (type), state, v, v = visit (TREE_TYPE (type), state, v,
sccstack, sccstate, sccstate_obstack); sccstack, sccstate, sccstate_obstack);
}
/* For integer types hash the types min/max values and the string flag. */ /* For integer types hash the types min/max values and the string flag. */
if (TREE_CODE (type) == INTEGER_TYPE) if (TREE_CODE (type) == INTEGER_TYPE)
...@@ -4183,27 +4173,11 @@ iterative_hash_gimple_type (tree type, hashval_t val, ...@@ -4183,27 +4173,11 @@ iterative_hash_gimple_type (tree type, hashval_t val,
v = visit (TYPE_METHOD_BASETYPE (type), state, v, v = visit (TYPE_METHOD_BASETYPE (type), state, v,
sccstack, sccstate, sccstate_obstack); sccstack, sccstate, sccstate_obstack);
/* For result types allow mismatch in completeness. */ /* Check result and argument types. */
if (RECORD_OR_UNION_TYPE_P (TREE_TYPE (type)))
{
v = iterative_hash_hashval_t (TREE_CODE (TREE_TYPE (type)), v);
v = iterative_hash_name
(TYPE_NAME (TYPE_MAIN_VARIANT (TREE_TYPE (type))), v);
}
else
v = visit (TREE_TYPE (type), state, v, v = visit (TREE_TYPE (type), state, v,
sccstack, sccstate, sccstate_obstack); sccstack, sccstate, sccstate_obstack);
for (p = TYPE_ARG_TYPES (type), na = 0; p; p = TREE_CHAIN (p)) for (p = TYPE_ARG_TYPES (type), na = 0; p; p = TREE_CHAIN (p))
{ {
/* For argument types allow mismatch in completeness. */
if (RECORD_OR_UNION_TYPE_P (TREE_VALUE (p)))
{
v = iterative_hash_hashval_t (TREE_CODE (TREE_VALUE (p)), v);
v = iterative_hash_name
(TYPE_NAME (TYPE_MAIN_VARIANT (TREE_VALUE (p))), v);
}
else
v = visit (TREE_VALUE (p), state, v, v = visit (TREE_VALUE (p), state, v,
sccstack, sccstate, sccstate_obstack); sccstack, sccstate, sccstate_obstack);
na++; na++;
......
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