diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/tm/wrap-3.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tm/wrap-3.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tm/wrap-3.c b/gcc/testsuite/gcc.dg/tm/wrap-3.c new file mode 100644 index 00000000000..0734436809f --- /dev/null +++ b/gcc/testsuite/gcc.dg/tm/wrap-3.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-fgnu-tm -fdump-tree-optimized" } */ + +void free (void *); +void wrapper (void *) __attribute__((transaction_wrap (free))); +void *p; + +void foo() +{ + __transaction_relaxed { free (p); } +} + +/* { dg-final { scan-tree-dump-times "free" 0 "optimized" } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ |