+2010-10-18 Richard Guenther <rguenther@suse.de>
+
+ PR lto/44950
+ * tree.c (free_lang_data_in_decl): As we clear TYPE_METHODS
+ also clear references to entries of it.
+
2010-10-18 Andi Kleen <ak@linux.intel.com>
PR other/43448
--- /dev/null
+// { dg-lto-do link }
+// { dg-lto-options { { -flto } { -g -flto } } }
+// { dg-extra-ld-options "-r -nostdlib" }
+
+struct Base { ~Base (); };
+void fun(void) { struct Deriv : Base { } x; }
/* DECL_SAVED_TREE holds the GENERIC representation for DECL.
At this point, it is not needed anymore. */
DECL_SAVED_TREE (decl) = NULL_TREE;
+
+ /* Clear the abstract origin if it refers to a method. Otherwise
+ dwarf2out.c will ICE as we clear TYPE_METHODS and thus the
+ origin will not be output correctly. */
+ if (DECL_ABSTRACT_ORIGIN (decl)
+ && DECL_CONTEXT (DECL_ABSTRACT_ORIGIN (decl))
+ && RECORD_OR_UNION_TYPE_P
+ (DECL_CONTEXT (DECL_ABSTRACT_ORIGIN (decl))))
+ DECL_ABSTRACT_ORIGIN (decl) = NULL_TREE;
}
else if (TREE_CODE (decl) == VAR_DECL)
{