re PR ipa/61659 (Extra undefined symbol because of devirtualization)
commitc0221884ecbda8d99a43aa0f5e306638c71533d6
authorJason Merrill <jason@redhat.com>
Thu, 10 Jul 2014 19:29:59 +0000 (10 15:29 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 10 Jul 2014 19:29:59 +0000 (10 15:29 -0400)
tree7cef2e435d85f003b0320c564b270b29bbcc9dca
parent7757d79bfcce1f13facc96a420eea4bcd542a3e2
re PR ipa/61659 (Extra undefined symbol because of devirtualization)

PR c++/61659
PR c++/61687
gcc/c-family/
* c.opt (-fuse-all-virtuals): New.
gcc/cp/
* decl2.c (mark_all_virtuals): New variable.
(maybe_emit_vtables): Check it instead of flag_devirtualize.
(cp_write_global_declarations): Set it and give helpful diagnostic
if it introduces errors.
* class.c (finish_struct_1): Check it.
* decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.

From-SVN: r212436
gcc/c-family/ChangeLog
gcc/c-family/c.opt
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/testsuite/g++.dg/template/dtor9.C
gcc/testsuite/g++.dg/template/dtor9a.C [new file with mode: 0644]