2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / ref1.C
blob802ede359c6d878119a0613ac14c6d658966b0cf
1 // { dg-do run  }
2 int count;
4 struct base {
5   base () { ++count; }
6   ~base () { --count; }
7   base(const base&o) { ++count; }
8 };
10 base base_returning_function ();
12 const base& base_ref = base_returning_function ();
14 int main () {
15   if (count != 1)
16     return 1;
19 base base_returning_function () {
20   base local_base_object;
21   return local_base_object;