☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
byval.C
☽
☼
gcc/testsuite/g++.old-deja/g++.jason/byval.C
code
plain
raw
1
// { dg-do run }
2
// Bug: a is destroyed in both foo() and main()
3
4
int count;
5
6
struct A {
7
double a,b;
8
A(int) { count++; }
9
A(const A&) { count++; }
10
~A() { count--; }
11
};
12
13
void foo (A a)
14
{ }
15
16
int main()
17
{
18
foo (1);
19
return count;
20
}