2010-04-26 Richard Guenther <rguenther@suse.de>
PR lto/42425
* tree.c (free_lang_data_in_type): Do not free TYPE_CONTEXT
if emitting debug information and it is either a function
or a namespace decl.
* g++.dg/lto/
20100423-2_0.C: New testcase.
From-SVN: r158722
+2010-04-26 Richard Guenther <rguenther@suse.de>
+
+ PR lto/42425
+ * tree.c (free_lang_data_in_type): Do not free TYPE_CONTEXT
+ if emitting debug information and it is either a function
+ or a namespace decl.
+
2010-04-26 Ira Rosen <irar@il.ibm.com>
* tree-vectorizer.h (struct _stmt_vec_info): Add new field to
+2010-04-26 Richard Guenther <rguenther@suse.de>
+
+ PR lto/42425
+ * g++.dg/lto/20100423-2_0.C: New testcase.
+
2010-04-26 Ira Rosen <irar@il.ibm.com>
* gcc.dg/vect/bb-slp-23.c: New test.
--- /dev/null
+// { dg-lto-do assemble }
+// { dg-lto-options {{-flto -g}} }
+
+struct A
+{
+ virtual ~A();
+};
+
+void foo()
+{
+ struct B : A {};
+ B b;
+}
+
TYPE_LANG_SLOT_1 (type) = NULL_TREE;
}
- TYPE_CONTEXT (type) = NULL_TREE;
+ if (debug_info_level < DINFO_LEVEL_TERSE
+ || (TYPE_CONTEXT (type)
+ && TREE_CODE (TYPE_CONTEXT (type)) != FUNCTION_DECL
+ && TREE_CODE (TYPE_CONTEXT (type)) != NAMESPACE_DECL))
+ TYPE_CONTEXT (type) = NULL_TREE;
+
if (debug_info_level < DINFO_LEVEL_TERSE)
TYPE_STUB_DECL (type) = NULL_TREE;
}