1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// { dg-do assemble } // GROUPS passed visibility class bottom { public: int b; // { dg-error "" } private }; class middle : private bottom { public: void foo () { b; } }; class top : public middle { public: void bar () { b; }// { dg-error "" } .* };