diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/tm/wrap-4.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tm/wrap-4.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tm/wrap-4.c b/gcc/testsuite/gcc.dg/tm/wrap-4.c new file mode 100644 index 00000000000..9e1e70c544f --- /dev/null +++ b/gcc/testsuite/gcc.dg/tm/wrap-4.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-fgnu-tm -fdump-tree-optimized -O2" } */ + +static void candy() { candycane(); } + +static void tootsie_roll () __attribute__((transaction_wrap (candy))); +static void tootsie_roll () { bark(); } + +void foo() +{ + __transaction_relaxed { candy(); } +} + +/* { dg-final { scan-tree-dump-times "candy" 0 "optimized" } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ |