From 21aac88050970dff5e2632aa355caed48eee894c Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Mon, 26 Apr 2010 11:03:59 +0000 Subject: lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT. 2010-04-26 Richard Guenther * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT. * gcc.dg/lto/20100426_0.c: New testcase. From-SVN: r158729 --- gcc/lto/lto.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/lto/lto.c') diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index b6001d8..9002686 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -1422,7 +1422,13 @@ lto_fixup_type (tree t, void *data) /* Accessor is for derived node types only. */ LTO_FIXUP_SUBTREE (t->type.binfo); - LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE (TYPE_CONTEXT (t)); + if (TYPE_CONTEXT (t)) + { + if (TYPE_P (TYPE_CONTEXT (t))) + LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE (TYPE_CONTEXT (t)); + else + LTO_FIXUP_SUBTREE (TYPE_CONTEXT (t)); + } LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE (TYPE_CANONICAL (t)); /* The following re-creates proper variant lists while fixing up -- cgit v1.1