re PR ipa/60854 (inline constructor of extern template)

PR ipa/60854
	* ipa.c (symtab_remove_unreachable_nodes): Mark targets of
	external aliases alive, too.
	* g++.dg/torture/pr60854.C: New testcase.

From-SVN: r209459
This commit is contained in:
Jan Hubicka 2014-04-17 04:22:57 +02:00 committed by Jan Hubicka
parent 9950a4f212
commit 789c274118
4 changed files with 36 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2014-04-16 Jan Hubicka <hubicka@ucw.cz>
PR ipa/60854
* ipa.c (symtab_remove_unreachable_nodes): Mark targets of
external aliases alive, too.
2014-04-16 Andrew Pinski <apinski@cavium.com>
* config/host-linux.c (TRY_EMPTY_VM_SPACE): Change aarch64 ilp32

View File

@ -415,7 +415,18 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
|| !DECL_EXTERNAL (e->callee->decl)
|| e->callee->alias
|| before_inlining_p))
pointer_set_insert (reachable, e->callee);
{
/* Be sure that we will not optimize out alias target
body. */
if (DECL_EXTERNAL (e->callee->decl)
&& e->callee->alias
&& before_inlining_p)
{
pointer_set_insert (reachable,
cgraph_function_node (e->callee));
}
pointer_set_insert (reachable, e->callee);
}
enqueue_node (e->callee, &first, reachable);
}

View File

@ -1,3 +1,8 @@
2014-04-16 Jan Hubicka <hubicka@ucw.cz>
PR ipa/60854
* g++.dg/torture/pr60854.C: New testcase.
2014-04-16 Catherine Moore <clm@codesourcery.com>
* gcc.target/mips/umips-store16-2.c: New test.

View File

@ -0,0 +1,13 @@
template <typename T>
class MyClass
{
public:
__attribute__ ((__always_inline__)) inline MyClass () { ; }
};
extern template class MyClass<double>;
void Func()
{
MyClass<double> x;
}