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
* c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
[official-gcc.git]
/
libitm
/
testsuite
/
libitm.c++
/
eh-4.C
blob
68275e99706d5d0add7fce575fdbb1b9449f55ab
1
// Test that throwing out of an atomic_commit block commits the transaction.
2
3
// { dg-do run }
4
// { dg-options "-fgnu-tm" }
5
6
int main()
7
{
8
static int i;
9
bool caught = false;
10
try {
11
atomic_commit {
12
i = 12;
13
throw 42;
14
i = 24;
15
}
16
} catch (int x) {
17
caught = (x == 42);
18
}
19
if (!caught || i != 12)
20
__builtin_abort();
21
}