OSDN Git Service

2011-05-16 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 May 2011 16:07:35 +0000 (16:07 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 May 2011 16:07:35 +0000 (16:07 +0000)
* gimple.c (gimple_types_compatible_p_1): Use names of the
type itself, not its main variant.
(iterative_hash_gimple_type): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173795 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/gimple.c

index 4f84299..209dd6f 100644 (file)
@@ -1,5 +1,11 @@
 2011-05-16  Richard Guenther  <rguenther@suse.de>
 
+       * gimple.c (gimple_types_compatible_p_1): Use names of the
+       type itself, not its main variant.
+       (iterative_hash_gimple_type): Likewise.
+
+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.
index ce632e0..488e971 100644 (file)
@@ -3817,8 +3817,7 @@ gimple_types_compatible_p_1 (tree t1, tree t2, type_pair_t p,
        tree f1, f2;
 
        /* The struct tags shall compare equal.  */
-       if (!compare_type_names_p (TYPE_MAIN_VARIANT (t1),
-                                  TYPE_MAIN_VARIANT (t2), false))
+       if (!compare_type_names_p (t1, t2, false))
          goto different_types;
 
        /* For aggregate types, all the fields must be the same.  */
@@ -4193,7 +4192,7 @@ iterative_hash_gimple_type (tree type, hashval_t val,
       unsigned nf;
       tree f;
 
-      v = iterative_hash_name (TYPE_NAME (TYPE_MAIN_VARIANT (type)), v);
+      v = iterative_hash_name (TYPE_NAME (type), v);
 
       for (f = TYPE_FIELDS (type), nf = 0; f; f = TREE_CHAIN (f))
        {