FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / return2.C
blob29da5b28e5873f1fd7f12dffd1e096d63e1a2765
1 // PRMS Id: 5368
2 // Bug: the X temporary in foo() is not destroyed.
4 int c = 0;
6 struct X {
7   X (int) { c++; }
8   ~X() { c--; }
9 };
11 struct Y {
12    Y(const X &) { }
15 Y foo() { 
16   return X(3); 
19 int main()
21   foo();
22   return c;