On 10/1/21 11:07, Jakub Jelinek wrote: > On Thu, Sep 30, 2021 at 03:01:49PM -0400, Jason Merrill wrote: >>> After fixing the incomplete std::strong_ordering spaceship-synth8.C is now >>> accepted, but I'm afraid I'm getting lost in this - clang++ rejects that >>> testcase instead complaining that D has <=> operator, but has it pure virtual. >> >> Ah, I think we need to add LOOKUP_NO_VIRTUAL to the flags variable, as we do >> in do_build_copy_assign. I suppose it wouldn't hurt to add LOOKUP_DEFAULTED >> as well. > > I've tried that (see patch below), but neither in build_comparison_op, nor > in genericize_spaceship those changes made any difference for > spaceship-synth8.C, it is still accepted instead of rejected. I've switched to handling bases via binfo as discussed on IRC and added spaceship-synth14.C to test proper base handling with virtual <=>. Here's what I'm committing: