Debian Codegraph @

gcc/testsuite/g++.dg/ext/varargs2.C

raw
1 // { dg-do run }
2
3 int c;
4 struct X { X() {}; X(const X&) { ++c; } };
5 void Foo (X, ...) {}
6 void bin (X &p)
7 {
8 Foo (p, p);
9 }
10
11 int main()
12 {
13 X x;
14 bin(x);
15 if (c != 2)
16 __builtin_abort();
17 }