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