OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Revert "Fix PR c++/44188"
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.eh
/
fntry1.C
1
// { dg-do run }
2
// Bug: g++ fails to treat function-try-blocks in ctors specially.
3
// Submitted by Jason Merrill <jason@cygnus.com>
4
5
int c;
6
int r;
7
8
struct A {
9
int i;
10
A(int j) { i = j; }
11
~A() { c += i; }
12
};
13
14
struct B: public A {
15
A a;
16
B() try : A(1), a(2)
17
{ throw 1; }
18
catch (...)
19
{ if (c != 3) r |= 1; }
20
};
21
22
int main ()
23
{
24
try
25
{ B b; }
26
catch (...)
27
{ c = 0; }
28
29
if (c != 0) r |= 2;
30
31
return r;
32
}