diff options
author | Richard Guenther <rguenther@suse.de> | 2011-05-16 15:10:05 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-05-16 15:10:05 +0000 |
commit | 1e83b5f197565d700a5a49d523e0ab77bdcbd809 (patch) | |
tree | 743b8a9127e1e0f5053be9d73ac442287b6ca1f5 | |
parent | 62e36382018b546b0ad24ff4c01edd7ef6f373fe (diff) | |
download | gcc-1e83b5f197565d700a5a49d523e0ab77bdcbd809.zip gcc-1e83b5f197565d700a5a49d523e0ab77bdcbd809.tar.gz gcc-1e83b5f197565d700a5a49d523e0ab77bdcbd809.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/gimple.c | 42 |
2 files changed, 14 insertions, 34 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a46fe6d..4f84299 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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> PR c++/48999 diff --git a/gcc/gimple.c b/gcc/gimple.c index ca3a5cb..ce632e0 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -4129,20 +4129,10 @@ iterative_hash_gimple_type (tree type, hashval_t val, } /* For pointer and reference types, fold in information about the type - pointed to but do not recurse into possibly incomplete types to - avoid hash differences for complete vs. incomplete types. */ + pointed to. */ 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, - sccstack, sccstate, sccstate_obstack); - } + v = visit (TREE_TYPE (type), state, v, + sccstack, sccstate, sccstate_obstack); /* For integer types hash the types min/max values and the string flag. */ if (TREE_CODE (type) == INTEGER_TYPE) @@ -4183,29 +4173,13 @@ iterative_hash_gimple_type (tree type, hashval_t val, v = visit (TYPE_METHOD_BASETYPE (type), state, v, sccstack, sccstate, sccstate_obstack); - /* For result types allow mismatch in completeness. */ - 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, - sccstack, sccstate, sccstate_obstack); - + /* Check result and argument types. */ + v = visit (TREE_TYPE (type), state, v, + sccstack, sccstate, sccstate_obstack); 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, - sccstack, sccstate, sccstate_obstack); + v = visit (TREE_VALUE (p), state, v, + sccstack, sccstate, sccstate_obstack); na++; } |