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
2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
eh
/
elide2.C
blob
7d65d9ee6abc664faa4de4144383533138bb03c1
1
// PR c++/13944
2
3
// Verify that we don't call terminate() if initializing the exception
4
// object throws.
5
6
// { dg-do run }
7
8
struct A
9
{
10
A() { }
11
A(const A&) { throw 1; }
12
};
13
14
A a;
15
16
int main()
17
{
18
try
19
{
20
throw a;
21
}
22
catch (int)
23
{
24
return 0;
25
}
26
catch (A&)
27
{
28
return 2;
29
}
30
return 3;
31
}