1 // { dg-do run }
2 
3 int c;
4 
5 struct Base {
BaseBase6   Base() {}
BaseBase7   Base(const Base &) { ++c; }
8   Base & operator = (const Base &);
9 };
10 
11 struct Derived : public Base {};
12 
13 const Base &b = Derived();
14 
main()15 int main()
16 {
17   return c;  // No copies should be required.
18 }
19