Commit 852be00c by Jason Merrill

new

From-SVN: r28764
parent b736d716
// Bug: g++ fails to treat function-try-blocks in ctors specially.
// Submitted by Jason Merrill <jason@cygnus.com>
int c;
int r;
struct A {
int i;
A(int j) { i = j; }
~A() { c += i; }
};
struct B: public A {
A a;
B() try : A(1), a(2)
{ throw 1; }
catch (...)
{ if (c != 3) r |= 1; }
};
int main ()
{
try
{ B b; }
catch (...)
{ c = 0; }
if (c != 0) r |= 2;
return r;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment