diff options
author | Jason Merrill <jason@redhat.com> | 2014-07-15 17:38:48 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2014-07-15 17:38:48 -0400 |
commit | 1b60eaedde85fc88a15e9b5353d8d15eb500a540 (patch) | |
tree | 21b01619d9423ffbb4c99d179bf0b83d45ee5646 | |
parent | a6d0b75042c9b56580edbcfb7a4ecfcdc76cbb04 (diff) | |
download | gcc-1b60eaedde85fc88a15e9b5353d8d15eb500a540.zip gcc-1b60eaedde85fc88a15e9b5353d8d15eb500a540.tar.gz gcc-1b60eaedde85fc88a15e9b5353d8d15eb500a540.tar.bz2 |
re PR c++/61811 (Firefox LTO build error due to undefined symbols)
PR c++/61811
* decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
From-SVN: r212576
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 14 |
2 files changed, 12 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1d5b7d6..231b315 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2014-07-15 Jason Merrill <jason@redhat.com> + PR c++/61811 + * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals. + PR c++/60848 PR c++/61723 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO. diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 0926dbc..83a07e6 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -2014,11 +2014,15 @@ maybe_emit_vtables (tree ctype) if (DECL_COMDAT (primary_vtbl) && CLASSTYPE_DEBUG_REQUESTED (ctype)) note_debug_info_needed (ctype); - if (mark_all_virtuals) - /* Make sure virtual functions get instantiated/synthesized so that - they can be inlined after devirtualization even if the vtable is - never emitted. */ - mark_vtable_entries (primary_vtbl); + if (mark_all_virtuals && !DECL_ODR_USED (primary_vtbl)) + { + /* Make sure virtual functions get instantiated/synthesized so that + they can be inlined after devirtualization even if the vtable is + never emitted. */ + mark_used (primary_vtbl); + mark_vtable_entries (primary_vtbl); + return true; + } return false; } |