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
som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode variables.
[official-gcc.git]
/
libitm
/
testsuite
/
libitm.c
/
alloc-1.c
blob
49faab5a0ba11d85ae348c802f8e542660530994
1
// Test that rolling back allocations works.
2
#include <stdlib.h>
3
4
void
__attribute
((
transaction_pure
,
noinline
))
dont_optimize
(
void
*
p
)
5
{
6
*(
volatile
char
*)
p
;
7
}
8
9
int
main
()
10
{
11
__transaction_atomic
{
12
void
*
p
=
malloc
(
23
);
13
dont_optimize
(
p
);
14
__transaction_cancel
;
15
}
16
return
0
;
17
}