]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: 'this' adjustment for devirtualized call
authorJason Merrill <jason@redhat.com>
Fri, 28 May 2021 03:54:52 +0000 (23:54 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 28 May 2021 12:56:42 +0000 (08:56 -0400)
commitf838e3ccf8d2849980e9d0f70aa60ecd2eb5772c
treee0f056341410f152dc66aa4d174ff5f2d5193aca
parent359c0a86e2974a9f3036bc05b6e6c661f2c463cf
c++: 'this' adjustment for devirtualized call

My patch for 95719 made us do a better job of finding the actual virtual
function we want to call, but didn't update the 'this' pointer adjustment to
match.

PR c++/100797
PR c++/95719

gcc/cp/ChangeLog:

* call.c (build_over_call): Adjust base_binfo in
resolves_to_fixed_type_p case.

gcc/testsuite/ChangeLog:

* g++.dg/inherit/virtual15.C: New test.
gcc/cp/call.c
gcc/testsuite/g++.dg/inherit/virtual15.C [new file with mode: 0644]
gcc/testsuite/g++.dg/inherit/virtual15a.C [new file with mode: 0644]