diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/temporary3.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/temporary3.C | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/temporary3.C b/gcc/testsuite/g++.old-deja/g++.jason/temporary3.C deleted file mode 100644 index 3ffeec79d93..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/temporary3.C +++ /dev/null @@ -1,26 +0,0 @@ -// Bug: the temporary returned from f is elided, causing a to be constructed -// twice but only destroyed once. - -extern "C" int printf (const char *, ...); - -int c,d; - -struct A { - A (int) { c++; } - ~A () { d++; } - A (const A&) { c++; } - int i; -}; - -A f () -{ return 1; } - -int main () -{ - { - A a (1); - a = f (); - } - printf ("%d %d\n", c, d); - return c != d; -} |