* 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
+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 ...
/* 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
+2010-04-26 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/lto/20100426_0.c: New testcase.
+
2010-04-26 Jie Zhang <jie@codesourcery.com>
PR tree-optimization/43833
--- /dev/null
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-r -nostdlib -flto -g}} } */
+
+long Perl_my_htonl (long l)
+{
+ union { } u;
+}