From 9bf2878c0a74475283b5424f24e46b31feb13cf7 Mon Sep 17 00:00:00 2001
From: Ilya Palachev <i.palachev@samsung.com>
Date: Tue, 7 Oct 2014 16:09:25 +0400
Subject: [PATCH] Add initialization and release of bitmap obstack
gcc/
2014-10-07 Ilya Palachev <i.palachev@samsung.com>
* cgraphunit.c (process_new_functions): Add initialization and
release of bitmap obstack before and after running of passes.
gcc/testsuite/
2014-10-07 Ilya Palachev <i.palachev@samsung.com>
* g++.dg/lto/pr59441_0.C: New test from bugzilla.
---
gcc/cgraphunit.c | 6 +++++-
gcc/testsuite/g++.dg/lto/pr59441_0.C | 26 ++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/g++.dg/lto/pr59441_0.C
@@ -323,7 +323,11 @@ symbol_table::process_new_functions (void)
push_cfun (DECL_STRUCT_FUNCTION (fndecl));
if (state == IPA_SSA
&& !gimple_in_ssa_p (DECL_STRUCT_FUNCTION (fndecl)))
- g->get_passes ()->execute_early_local_passes ();
+ {
+ bitmap_obstack_initialize (NULL);
+ g->get_passes ()->execute_early_local_passes ();
+ bitmap_obstack_release (NULL);
+ }
else if (inline_summary_vec != NULL)
compute_inline_parameters (node, true);
free_dominance_info (CDI_POST_DOMINATORS);
new file mode 100644
@@ -0,0 +1,26 @@
+// { dg-lto-do assemble }
+// { dg-lto-options { { -shared -fPIC -flto -O -fvtable-verify=std } } }
+
+template < typename T > struct A
+{
+ T foo ();
+};
+
+template < typename T > struct C: virtual public A < T >
+{
+ C & operator<< (C & (C &));
+};
+
+template < typename T >
+C < T > &endl (C < int > &c)
+{
+ c.foo ();
+ return c;
+}
+
+C < int > cout;
+void
+fn ()
+{
+ cout << endl;
+}
--
2.1.1