https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64077
--- Comment #2 from Andrew Dixie <gcc at dixie dot net.nz> --- (In reply to Daniel Krügler from comment #1) Thanks for investigating and providing the reference. I did not understand that upcasts were intended to override potential cross casts, issue 665 makes this clear. I agree the testcase is invalid. In p5, is "inaccessible" meant to include friendship relationships granted by the current scope or instead use the explicit public base rules spelt out in p8? The second part of the patch was implementing the latter, but I now also think this is invalid.