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.
2 files changed