Add another testcase I found lying around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8186 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-08-28 20:33:46 +00:00
parent 206c7d029d
commit 81f0dbdc23

View File

@ -0,0 +1,23 @@
#include <stdio.h>
static int c;
struct A {
A() { ++c; }
A(const A&) { ++c; }
~A() { --c; }
};
struct B {
A a;
B() { A a; throw 1; }
};
int main() {
try {
B b;
} catch (...) {}
if (!c) printf("All ok!\n");
return c;
}