c++: look for empty base at specific offset [PR109678]
commita43f3616c0069541b1f465eea67285eeeff36785
authorJason Merrill <jason@redhat.com>
Tue, 2 May 2023 01:03:45 +0000 (1 21:03 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 2 May 2023 20:24:20 +0000 (2 16:24 -0400)
tree0163b56e55840e3f3ebd74706dcbfc653c024f30
parent4b8d0d4d7fd245ef85c7801e7838845502a5a61d
c++: look for empty base at specific offset [PR109678]

While looking at the empty base handling for 109678, it occurred to me that
we ought to be able to look for an empty base at a specific offset, not just
in general.

PR c++/109678

gcc/cp/ChangeLog:

* cp-tree.h (lookup_base): Add offset parm.
* constexpr.cc (cxx_fold_indirect_ref_1): Pass it.
* search.cc (struct lookup_base_data_s): Add offset.
(dfs_lookup_base): Handle it.
(lookup_base): Pass it.
gcc/cp/constexpr.cc
gcc/cp/cp-tree.h
gcc/cp/search.cc