]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
objc-act.c (objc_xref_basetypes): Set TYPE_BINFO of type variants, too.
authorJan Hubicka <hubicka@ucw.cz>
Sat, 28 Jun 2014 23:30:58 +0000 (01:30 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 28 Jun 2014 23:30:58 +0000 (23:30 +0000)
* objc-act.c (objc_xref_basetypes): Set TYPE_BINFO of type variants,
too.

From-SVN: r212112

gcc/objc/ChangeLog
gcc/objc/objc-act.c

index dfd8f387e06181d22fb0ca862b5d8c8c45432712..b1f3d9e0fe3ee8074a279ef08565703d8e50141e 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-24  Jan Hubicka  <hubicka@ucw.cz>
+
+       * objc-act.c (objc_xref_basetypes): Set TYPE_BINFO of type variants,
+       too.
+
 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
 
        * objc-act.c: Adjust.
index c379a51ba9a0065c8e5a776b6d9174b17fd1f7b1..ef110523691dbd37cfa9600df42a643ce66c923d 100644 (file)
@@ -2695,12 +2695,16 @@ objc_copy_binfo (tree binfo)
 static void
 objc_xref_basetypes (tree ref, tree basetype)
 {
+  tree variant;
   tree binfo = make_tree_binfo (basetype ? 1 : 0);
-
   TYPE_BINFO (ref) = binfo;
   BINFO_OFFSET (binfo) = size_zero_node;
   BINFO_TYPE (binfo) = ref;
 
+  gcc_assert (TYPE_MAIN_VARIANT (ref) == ref);
+  for (variant = ref; variant; variant = TYPE_NEXT_VARIANT (variant))
+    TYPE_BINFO (variant) = binfo;
+
   if (basetype)
     {
       tree base_binfo = objc_copy_binfo (TYPE_BINFO (basetype));