repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
eh
/
elide2.C
blob
618ee6f400634a5a3b06e9de842afe9957e312da
1
// PR c++/13944
2
3
// Verify that we still call terminate() if we do run the copy constructor,
4
// and it throws.
5
6
// { dg-do run }
7
8
#include <cstdlib>
9
#include <exception>
10
11
struct A
12
{
13
A() { }
14
A(const A&) { throw 1; }
15
};
16
17
A a;
18
19
void
20
good_terminate() { std::exit (0); }
21
22
int main()
23
{
24
std::set_terminate (good_terminate);
25
try
26
{
27
throw a;
28
}
29
catch (...)
30
{
31
return 2;
32
}
33
return 3;
34
}