[Bug c++/100797] [10/11 Regression] using declaration causing virtual call with wrongly adjusted this pointer

2021-06-01 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100797

Jason Merrill  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED
   Target Milestone|10.4|9.4

--- Comment #10 from Jason Merrill  ---
Fixed for 9.4/10.4/11.2/12.

[Bug c++/100797] [10/11 Regression] using declaration causing virtual call with wrongly adjusted this pointer

2021-06-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100797

--- Comment #9 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Jason Merrill
:

https://gcc.gnu.org/g:1027e8c8837d9d4933946f2888d85deef2cf850b

commit r10-9876-g1027e8c8837d9d4933946f2888d85deef2cf850b
Author: Jason Merrill 
Date:   Thu May 27 23:54:52 2021 -0400

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.

This backport also incorporates a bit of the r11-1638 reorganization.

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.
* g++.dg/inherit/virtual15a.C: New test.

[Bug c++/100797] [10/11 Regression] using declaration causing virtual call with wrongly adjusted this pointer

2021-06-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100797

--- Comment #8 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Jason Merrill
:

https://gcc.gnu.org/g:7c61ce59421547194647a847263b2b9065a26e03

commit r11-8494-g7c61ce59421547194647a847263b2b9065a26e03
Author: Jason Merrill 
Date:   Thu May 27 23:54:52 2021 -0400

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.

[Bug c++/100797] [10/11 Regression] using declaration causing virtual call with wrongly adjusted this pointer

2021-06-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100797

Richard Biener  changed:

   What|Removed |Added

  Known to work||9.4.0
  Known to fail||9.3.1
Summary|[10/11/12 Regression] using |[10/11 Regression] using
   |declaration causing virtual |declaration causing virtual
   |call with wrongly adjusted  |call with wrongly adjusted
   |this pointer|this pointer
   Target Milestone|9.5 |10.4