Re: [PATCH] c++: constexpr pointer indirection with negative offset [PR100209]

2021-04-27 Thread Jason Merrill via Gcc-patches
On 4/26/21 3:05 PM, Patrick Palka wrote: On Mon, 26 Apr 2021, Jason Merrill wrote: On 4/26/21 12:17 PM, Patrick Palka wrote: During constexpr evaluation, a base-to-derived conversion may yield an expression like (Derived*)(&D.2217.D.2106 p+ -4) where D.2217 is the derived object and D.2106 is

Re: [PATCH] c++: constexpr pointer indirection with negative offset [PR100209]

2021-04-26 Thread Patrick Palka via Gcc-patches
On Mon, 26 Apr 2021, Jason Merrill wrote: > On 4/26/21 12:17 PM, Patrick Palka wrote: > > During constexpr evaluation, a base-to-derived conversion may yield an > > expression like (Derived*)(&D.2217.D.2106 p+ -4) where D.2217 is the > > derived object and D.2106 is the base. But cxx_fold_indirec

Re: [PATCH] c++: constexpr pointer indirection with negative offset [PR100209]

2021-04-26 Thread Jason Merrill via Gcc-patches
On 4/26/21 12:17 PM, Patrick Palka wrote: During constexpr evaluation, a base-to-derived conversion may yield an expression like (Derived*)(&D.2217.D.2106 p+ -4) where D.2217 is the derived object and D.2106 is the base. But cxx_fold_indirect_ref doesn't know how to resolve an INDIRECT_REF there

[PATCH] c++: constexpr pointer indirection with negative offset [PR100209]

2021-04-26 Thread Patrick Palka via Gcc-patches
During constexpr evaluation, a base-to-derived conversion may yield an expression like (Derived*)(&D.2217.D.2106 p+ -4) where D.2217 is the derived object and D.2106 is the base. But cxx_fold_indirect_ref doesn't know how to resolve an INDIRECT_REF thereof to just D.2217, because it doesn't handle