aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/virtual2.C
blob: a3ebbcd40e17d71a31229c628a58b993149ab255 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
struct B
{
  virtual int f() volatile
    { return 0; }
};


struct D : public B 
{
  virtual int f()
    { return 1; }
};

int main()
{
  volatile D d;
  volatile B& b = d;
  return b.f();
}