PR lto/51198
* tree.c (free_lang_data_in_decl): Clear FIELD_DECL's
DECL_INITIAL also.
2011-12-01 Andrew Pinski <apinski@cavium.com>
PR lto/51198
* g++.dg/torture/pr51198.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181886
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-12-01 Andrew Pinski <apinski@cavium.com>
+
+ PR lto/51198
+ * tree.c (free_lang_data_in_decl): Clear FIELD_DECL's
+ DECL_INITIAL also.
+
2011-12-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/51246
+2011-12-01 Andrew Pinski <apinski@cavium.com>
+
+ PR lto/51198
+ * g++.dg/torture/pr51198.C: New testcase.
+
2011-12-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/51246
--- /dev/null
+/* { dg-options "-std=gnu++0x" } */
+
+struct A
+{
+ int i = 0 ? 0 : throw 1;
+};
+
+
+struct B
+{
+ int f();
+ int i = f();
+};
+
+struct C
+{
+ C(int);
+};
+
+struct D
+{
+ C a = 0;
+};
+
+A a;
+B b;
+D d;
+
+
|| (decl_function_context (decl) && !TREE_STATIC (decl)))
DECL_INITIAL (decl) = NULL_TREE;
}
- else if (TREE_CODE (decl) == TYPE_DECL)
+ else if (TREE_CODE (decl) == TYPE_DECL
+ || TREE_CODE (decl) == FIELD_DECL)
DECL_INITIAL (decl) = NULL_TREE;
else if (TREE_CODE (decl) == TRANSLATION_UNIT_DECL
&& DECL_INITIAL (decl)