blob: 3b17da029e83999daa35f69be9fb1c36002c37d7 [file] [log] [blame]
// simplified from testcase in Windows Developer Journal,
// submitted by eyal.ben-david@aks.com
// The initialization of a static local variable must be retried if a
// previous try finished by throwing an exception [stmt.dcl]/4
struct foo {
foo() { throw true; }
};
void bar() {
static foo baz;
}
int main() {
try {
bar(); // must throw
}
catch (bool) {
try {
bar(); // must throw again!
}
catch (bool) {
return 0;
}
}
abort();
}