https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125745

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Jason Merrill
<[email protected]>:

https://gcc.gnu.org/g:0ba14502c966d4e8c64bc701d41b0ff9a84ea130

commit r16-9160-g0ba14502c966d4e8c64bc701d41b0ff9a84ea130
Author: Jason Merrill <[email protected]>
Date:   Tue Jun 23 09:49:36 2026 -0400

    c++: ubsan and inherited vptr [PR125745]

    cp_ubsan_instrument_vptr tried to open-code vfield access and failed to
    look into the base subobject to find it.  We have a function for that.

            PR c++/125745

    gcc/cp/ChangeLog:

            * cp-ubsan.cc (cp_ubsan_instrument_vptr): Use build_vfield_ref.

    gcc/testsuite/ChangeLog:

            * g++.dg/ubsan/vptr-19.C: New test.

    (cherry picked from commit 88f05f89957383f7b0328e9c558ebb12d1d58f52)

Reply via email to