Skip to content
Snippets Groups Projects
Commit 8e915901 authored by Jason Merrill's avatar Jason Merrill
Browse files

c++: vptr ubsan and derived class [PR95311].

We weren't able to find OBJ_TYPE_REF_OBJECT walking through
OBJ_TYPE_REF_EXPR because we had folded away the ADDR_EXPR.

gcc/cp/ChangeLog:

	PR c++/95311
	PR c++/95221
	* class.c (build_vfn_ref): Don't fold the INDIRECT_REF.

gcc/testsuite/ChangeLog:

	PR c++/95311
	* g++.dg/ubsan/vptr-16.C: New test.
parent 83c34c44
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment