Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / opt / nrv6.C
blob57ff12e41f4f5f6d72f460ef0326e0c15d4a68a3
1 // PR c++/9993
2 // Bug: We were failing to destroy b.
4 // { dg-do run }
6 int c, d;
8 struct Object {
9   Object()                      { ++c; }
10   Object(const Object&)         { ++c; }
11   ~Object()                     { ++d; }
14 Object function() {
15   int i = 0;
16   do {
17     Object b;
18     if (i++ == 2)
19       return b;
20   } while (1);
23 int main() {
24   function();
25   return c != d;