2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / goto4.C
blobfa0dd5a797aee1dfd53527d1ffa911fe16cf309d
1 // { dg-do run  }
2 // Test that we clean up temporaries bound to references properly when
3 // jumping out of their scope.
5 int ret = 1;
7 struct A
9   ~A() { ret = 0; }
12 void f()
14   if (0)
15     {
16     out:
17       return;
18     }
19   const A& a = A();
20   goto out;
23 int main()
25   f();
26   return ret;