In the discussion of PR 59469, Honza said that the C++ front end should
be setting forced_by_abi on explicitly instantiated decls. This patch
does that, though unfortunately it does not seem to be sufficient to fix
the bug.
Tested x86_64-pc-linux-gnu, applying to trunk.
commit 2c704f89487f0df704afe4d953f5a336b10214ca
Author: Jason Merrill <ja...@redhat.com>
Date: Fri Jan 31 13:02:14 2014 -0500
PR c++/59469
* pt.c (mark_decl_instantiated): Call mark_needed.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index ae5995b..7967db8 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -17967,6 +17967,7 @@ mark_decl_instantiated (tree result, int extern_p)
else
{
mark_definable (result);
+ mark_needed (result);
/* Always make artificials weak. */
if (DECL_ARTIFICIAL (result) && flag_weak)
comdat_linkage (result);