gcc/testsuite/gcc.dg/tm/props-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-fgnu-tm -fdump-tree-tmedge -fdump-tree-tmlower" } */ |
| 3 | |
| 4 | int global; |
| 5 | |
| 6 | void |
| 7 | foo(int local) |
| 8 | { |
| 9 | __transaction_atomic { |
| 10 | local++; |
| 11 | if (++global == 10) |
| 12 | __transaction_cancel; |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | /* { dg-final { scan-tree-dump-times " instrumentedCode" 1 "tmedge" } } */ |
| 17 | /* { dg-final { scan-tree-dump-times "hasNoAbort" 0 "tmedge" } } */ |
| 18 | /* { dg-final { scan-tree-dump-times "GTMA_HAVE_ABORT" 1 "tmlower" } } */ |