OSDN Git Service

PR lto/48148
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Apr 2011 14:46:37 +0000 (14:46 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Apr 2011 14:46:37 +0000 (14:46 +0000)
* gimple.c (gimple_types_compatible_p_1) <ENUMERAL_TYPE>: Do not merge
the types if they have different enumeration identifiers.

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

gcc/ChangeLog
gcc/gimple.c

index efad7e5..dfdb6b3 100644 (file)
@@ -1,3 +1,9 @@
+2011-04-19  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR lto/48148
+       * gimple.c (gimple_types_compatible_p_1) <ENUMERAL_TYPE>: Do not merge
+       the types if they have different enumeration identifiers.
+
 2011-04-19  Jan Hubicka  <jh@suse.cz>
 
        * cgraph.h (cgraph_optimize_for_size_p): Declare.
index f19b219..c6868be 100644 (file)
@@ -3731,6 +3731,9 @@ gimple_types_compatible_p_1 (tree t1, tree t2, enum gtc_mode mode,
 
            if (tree_int_cst_equal (c1, c2) != 1)
              goto different_types;
+
+           if (mode == GTC_MERGE && TREE_PURPOSE (v1) != TREE_PURPOSE (v2))
+             goto different_types;
          }
 
        /* If one enumeration has more values than the other, they