OSDN Git Service

* gcc.dg/20020201-1.c: Use cleanup-coverage_files.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / virtual3.C
1 // { dg-do run  }
2 struct B
3 {
4   virtual int f() volatile
5     { return 1; }
6 };
7
8 struct D : public B 
9 {
10   int f() 
11     { return 0; }
12 };
13
14 struct D2 : public D
15 {
16   int f()
17     { return 2; } 
18 };
19
20 int main()
21 {
22   D2 d2;
23   D& d = d2;
24   return d.f();
25 }