1// { dg-do run } 2// Bug: a is destroyed in both foo() and main() 3 4int count; 5 6struct A { 7 double a,b; 8 A(int) { count++; } 9 A(const A&) { count++; } 10 ~A() { count--; } 11}; 12 13void foo (A a) 14{ } 15 16int main() 17{ 18 foo (1); 19 return count; 20} 21