summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/local1.C
blob: 9cecaee6f2ad4b52de1c90bcfac99fb957074b30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-options "-O" }

struct Outer {
  struct Inner { virtual bool f() = 0; };
  void g(Inner &) const;
};
 
inline void h(const Outer &o)
{
  struct Local : public Outer::Inner {
    virtual bool f() {};
  };
  Local l;
  o.g(l);
}
 
void f(Outer &req) {
  h (req);
}