Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.jason/access16.C

raw
1 // { dg-do assemble }
2 // Bug: g++ uses the same binfo for the a subobject of c and the a subobject
3 // of b, so basetype_paths get bashed improperly.
4
5 class a {
6 protected:
7 virtual void foo() { } // { dg-bogus "" }
8 };
9
10 class b : public virtual a {};
11
12 class c : public b {
13 public:
14 void bar() { b::foo(); } // { dg-bogus "" }
15 };
16
17 int main() {
18 c test;
19 test.bar();
20 }