re PR c++/42608 (Undefined reference not reported in case of explicit template instan...
authorJakub Jelinek <jakub@redhat.com>
Thu, 14 Jan 2010 22:41:02 +0000 (23:41 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 14 Jan 2010 22:41:02 +0000 (23:41 +0100)
commit5b1cbe1453663b9abd6df089c2882071f2335fb2
treecce96a1384605a32918e26237bbc9b895bbda31d
parent7d2a845248174754046207cb2e634b64aea86b01
re PR c++/42608 (Undefined reference not reported in case of explicit template instantiation)

PR c++/42608
* varasm.c (declare_weak): Add weak attribute to decl if it
doesn't have one already.
(assemble_external): Only add decls to weak_decls if they also
have weak attribute.

* g++.dg/template/instantiate11.C: New test.

From-SVN: r155919
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/instantiate11.C [new file with mode: 0644]
gcc/varasm.c