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:
parent
9950a4f212
commit
789c274118
@ -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
|
||||
|
13
gcc/ipa.c
13
gcc/ipa.c
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
13
gcc/testsuite/g++.dg/torture/pr60854.C
Normal file
13
gcc/testsuite/g++.dg/torture/pr60854.C
Normal 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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user