2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.brendan / scope2.C
blob1d211aac40306609711ab633035c995a318897d5
1 // { dg-do assemble  }
2 // GROUPS passed scoping
3 class A
5  public:
6   A() {}
7   ~A() {}
8   virtual void f() {}
9 };
11 class B : public A
13  public:
14   B() {}
15   ~B() {}
16   virtual void f() {}
20 B GLOBAL_B;
22 B& foo() {return GLOBAL_B;}
24 int main()
26   // build_scoped_method_call and build_scoped_ref should know how
27   // to deal with a reference for this
28   foo().A::f();