diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-26 11:03:59 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-26 11:03:59 +0000 |
commit | 9c4917114d3ee41f90c08fdd7ad5399f0e43783e (patch) | |
tree | a66f2b3410ab3113cd6d179fda9bc8957e33e231 /gcc/lto | |
parent | bca0860e20ea2e35cf5dc2448e70c3d3dd07f22e (diff) | |
download | ppe42-gcc-9c4917114d3ee41f90c08fdd7ad5399f0e43783e.tar.gz ppe42-gcc-9c4917114d3ee41f90c08fdd7ad5399f0e43783e.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158729 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/lto/lto.c | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 069b5890d84..24212a1f4a6 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,7 @@ +2010-04-26 Richard Guenther <rguenther@suse.de> + + * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT. + 2010-04-26 Dave Korn <dave.korn.cygwin@gmail.com> * lto.h (lto_elf_file_open): Rename prototype from this ... diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index b6001d85dd0..9002686ae65 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 |