summaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-28 23:30:58 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-28 23:30:58 +0000
commitd8d5c9afd8a9f9907645d44e3694282066c5413d (patch)
treec4567752029a899936443fa1ebb44e45b38355a6 /gcc/objc
parent79d6fbc5715dc2a994ae537df2c76cbaf459b57c (diff)
downloadgcc-d8d5c9afd8a9f9907645d44e3694282066c5413d.tar.gz
* objc-act.c (objc_xref_basetypes): Set TYPE_BINFO of type variants,
too. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212112 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/ChangeLog5
-rw-r--r--gcc/objc/objc-act.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index dfd8f387e06..b1f3d9e0fe3 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -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.
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index c379a51ba9a..ef110523691 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -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));