repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* arm.md (stack_tie): New insn. Use an idiom that the alias code
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.eh
/
fntry1.C
blob
9c1c0ff0a791301b790a9ab83c047b2705fd8b93
1
// Bug: g++ fails to treat function-try-blocks in ctors specially.
2
// Submitted by Jason Merrill <jason@cygnus.com>
3
4
int c;
5
int r;
6
7
struct A {
8
int i;
9
A(int j) { i = j; }
10
~A() { c += i; }
11
};
12
13
struct B: public A {
14
A a;
15
B() try : A(1), a(2)
16
{ throw 1; }
17
catch (...)
18
{ if (c != 3) r |= 1; }
19
};
20
21
int main ()
22
{
23
try
24
{ B b; }
25
catch (...)
26
{ c = 0; }
27
28
if (c != 0) r |= 2;
29
30
return r;
31
}