diff options
author | Jason Merrill <jason@redhat.com> | 2011-02-28 16:41:21 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-02-28 16:41:21 -0500 |
commit | 2c1fb3eefdae087e7990b952563fd519d4736633 (patch) | |
tree | eb622a45254ed7a659ea498db5203a51bce80095 /gcc/cp/class.c | |
parent | 998871e99f606ee7c70f86e3e4edaeb0fecf88a8 (diff) | |
download | gcc-2c1fb3eefdae087e7990b952563fd519d4736633.zip gcc-2c1fb3eefdae087e7990b952563fd519d4736633.tar.gz gcc-2c1fb3eefdae087e7990b952563fd519d4736633.tar.bz2 |
re PR c++/47873 (virtual Inheritance - Covariant Virtual Function - Segfault)
PR c++/47873
* class.c (update_vtable_entry_for_fn): Check BINFO_LOST_PRIMARY_P
after checking for a non-thunk.
From-SVN: r170576
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 0d485fc..1325260 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -2250,10 +2250,10 @@ update_vtable_entry_for_fn (tree t, tree binfo, tree fn, tree* virtuals, { tree main_binfo = TYPE_BINFO (BINFO_TYPE (b)); tree bv = chain_index (ix, BINFO_VIRTUALS (main_binfo)); - if (BINFO_LOST_PRIMARY_P (b)) - lost = true; if (!DECL_THUNK_P (TREE_VALUE (bv))) break; + if (BINFO_LOST_PRIMARY_P (b)) + lost = true; } first_defn = b; } |