tree.c (get_binfo_at_offset): Use BINFO_TYPE instead of TREE_TYPE, compare TYPE_MAIN_...
authorMartin Jambor <mjambor@suse.cz>
Sun, 26 Dec 2010 21:01:11 +0000 (22:01 +0100)
committerMartin Jambor <jamborm@gcc.gnu.org>
Sun, 26 Dec 2010 21:01:11 +0000 (22:01 +0100)
2010-12-26  Martin Jambor  <mjambor@suse.cz>

* tree.c (get_binfo_at_offset): Use BINFO_TYPE instead of TREE_TYPE,
compare TYPE_MAIN_VARIANTs of types.

From-SVN: r168255

gcc/ChangeLog
gcc/tree.c

index 1c8293f5ac2b80f28f931faaeeb6b82347b5eb91..137ce3b30d47cc59896135d40f34492453300ef6 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-26  Martin Jambor  <mjambor@suse.cz>
+
+       * tree.c (get_binfo_at_offset): Use BINFO_TYPE instead of TREE_TYPE,
+       compare TYPE_MAIN_VARIANTs of types.
+
 2010-12-26  Andreas Schwab  <schwab@linux-m68k.org>
 
        * config/m68k/t-linux (M68K_MLIB_CPU): Only include 680x0 CPUs.
index 26622789bf611b7e716f544c00bd6a8234f0ced7..cc95d70bee0df9989c65d91825d06560fcf9eec5 100644 (file)
@@ -10939,7 +10939,7 @@ lhd_gcc_personality (void)
 tree
 get_binfo_at_offset (tree binfo, HOST_WIDE_INT offset, tree expected_type)
 {
-  tree type = TREE_TYPE (binfo);
+  tree type = BINFO_TYPE (binfo);
 
   while (true)
     {
@@ -10947,7 +10947,7 @@ get_binfo_at_offset (tree binfo, HOST_WIDE_INT offset, tree expected_type)
       tree fld;
       int i;
 
-      if (type == expected_type)
+      if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (expected_type))
          return binfo;
       if (offset < 0)
        return NULL_TREE;