4f8a3b87f9
libitm/ * libitm_i.h (gtm_alloc_action): Remove union. * testsuite/libitm.c/alloc-1.c: New. From-SVN: r230727
18 lines
296 B
C
18 lines
296 B
C
// Test that rolling back allocations works.
|
|
#include <stdlib.h>
|
|
|
|
void __attribute((transaction_pure,noinline)) dont_optimize(void* p)
|
|
{
|
|
*(volatile char *) p;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
__transaction_atomic {
|
|
void *p = malloc (23);
|
|
dont_optimize (p);
|
|
__transaction_cancel;
|
|
}
|
|
return 0;
|
|
}
|