aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto/lto.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-04-26 11:03:59 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-04-26 11:03:59 +0000
commit21aac88050970dff5e2632aa355caed48eee894c (patch)
treea66f2b3410ab3113cd6d179fda9bc8957e33e231 /gcc/lto/lto.c
parent330af32c066a204be770dd623f9fe605262d58ac (diff)
downloadgcc-21aac88050970dff5e2632aa355caed48eee894c.zip
gcc-21aac88050970dff5e2632aa355caed48eee894c.tar.gz
gcc-21aac88050970dff5e2632aa355caed48eee894c.tar.bz2
lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
2010-04-26 Richard Guenther <rguenther@suse.de> * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT. * gcc.dg/lto/20100426_0.c: New testcase. From-SVN: r158729
Diffstat (limited to 'gcc/lto/lto.c')
-rw-r--r--gcc/lto/lto.c8
1 files changed, 7 insertions, 1 deletions
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