Sign in
gnu
/
gcc
/
1f16a020acbea0af26209478990b83b1a1ba3a2b
/
.
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
byval.C
blob: e09c6ea66405f40f05b8b59c0705f2529d9d4682 [
file
] [
log
] [
blame
]
// { 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
;
}