On Mon, Mar 13, 2017 at 8:06 AM, Nathan Sidwell <nat...@acm.org> wrote: > The resolution to DR 1658 causes vbases of abstract classes to be ignored > when building the cdtors. That made sense for ctors, when there might be no > default ctor available. But for dtors, there is only oe dtor and they can > be virtual. That can break virtual overriding, as 79393 discovered. > > I've reported this as a DR, but so GCC 7 doesn't break currently working > code, I've committed this patch to skip that part of 1658's resolution. > > The inhibiting of access checks was needed of pr66443-cxx14-3.C to continue > passing. That's a case where the vbase's dtor is inaccessible from the > abstract base. That seemed like the most conservative way to inhibit 1658's > impact by allowing the most code to be compiled, but of course is > speculative.
It looks like you're ignoring the access for all base destructors; handling this in synthesized_method_base_walk would let you limit the change to vbases with virtual destructors. That function also already handles ignoring access control for an inherited constructor. Jason