diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/tm/trxn-expr-3.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/c-c++-common/tm/trxn-expr-3.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/tm/trxn-expr-3.c b/gcc-4.9/gcc/testsuite/c-c++-common/tm/trxn-expr-3.c new file mode 100644 index 000000000..db66873dc --- /dev/null +++ b/gcc-4.9/gcc/testsuite/c-c++-common/tm/trxn-expr-3.c @@ -0,0 +1,14 @@ +// { dg-do compile } +// { dg-options "-fgnu-tm -O -fdump-tree-tmmark" } + +int global; + +int f2() +{ + return __transaction_atomic (global + 3) + + __transaction_atomic (global + 4); +} + +/* { dg-final { scan-tree-dump-times "ITM_RU" 2 "tmmark" } } */ +/* { dg-final { scan-tree-dump-times "ITM_commitTransaction" 4 "tmmark" } } */ +/* { dg-final { cleanup-tree-dump "tmmark" } } */ |