2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / byval.C
blobe09c6ea66405f40f05b8b59c0705f2529d9d4682
1 // { dg-do run  }
2 // Bug: a is destroyed in both foo() and main()
4 int count;
6 struct A {
7   double a,b;
8   A(int) { count++; }
9   A(const A&) { count++; }
10   ~A() { count--; }
13 void foo (A a)
14 { }
16 int main()
18   foo (1);
19   return count;