diff options
author | Jason Merrill <jason@redhat.com> | 2014-07-10 15:29:59 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2014-07-10 15:29:59 -0400 |
commit | c0221884ecbda8d99a43aa0f5e306638c71533d6 (patch) | |
tree | 7cef2e435d85f003b0320c564b270b29bbcc9dca /gcc/cp/class.c | |
parent | 7757d79bfcce1f13facc96a420eea4bcd542a3e2 (diff) | |
download | gcc-c0221884ecbda8d99a43aa0f5e306638c71533d6.zip gcc-c0221884ecbda8d99a43aa0f5e306638c71533d6.tar.gz gcc-c0221884ecbda8d99a43aa0f5e306638c71533d6.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 3a44dba..d0eb103 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -6408,7 +6408,7 @@ finish_struct_1 (tree t) in every translation unit where the class definition appears. If we're devirtualizing, we can look into the vtable even if we aren't emitting it. */ - if (CLASSTYPE_KEY_METHOD (t) == NULL_TREE || flag_devirtualize) + if (CLASSTYPE_KEY_METHOD (t) == NULL_TREE || flag_use_all_virtuals) keyed_classes = tree_cons (NULL_TREE, t, keyed_classes); } |