gcc/testsuite/gcc.dg/tm/wrap-3.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-fgnu-tm -fdump-tree-optimized" } */ |
| 3 | |
| 4 | void free (void *); |
| 5 | void wrapper (void *) __attribute__((transaction_wrap (free))); |
| 6 | void *p; |
| 7 | |
| 8 | void foo() |
| 9 | { |
| 10 | __transaction_relaxed { free (p); } |
| 11 | } |
| 12 | |
| 13 | /* We still have one call to free()-- on the uninstrumented path |
| 14 | everything is as usual. */ |
| 15 | /* { dg-final { scan-tree-dump-times "free" 1 "optimized" } } */ |
| 16 |