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
* ipa-visibility.c (function_and_variable_visibility): Only
[official-gcc.git]
/
libitm
/
testsuite
/
libitm.c++
/
eh-1.C
blob
49e2213e1ff9d508802615309c961b0d447b9a5d
1
// { dg-do run }
2
3
extern "C" void abort ();
4
5
int dothrow;
6
int g;
7
8
static void f1()
9
{
10
g++;
11
if (dothrow)
12
throw 1;
13
}
14
15
static void f2()
16
{
17
__transaction_atomic {
18
f1();
19
}
20
}
21
22
int main()
23
{
24
dothrow = 0;
25
f2();
26
27
dothrow = 1;
28
try {
29
f2();
30
} catch (...) {
31
}
32
33
if (g != 2)
34
abort ();
35
return 0;
36
}