gcc/testsuite/g++.dg/tm/pr51516.C
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-fgnu-tm -fdump-tree-optimized" } */ |
| 3 | |
| 4 | struct C { |
| 5 | long l; |
| 6 | C():l(0) {} |
| 7 | }; |
| 8 | |
| 9 | int main() |
| 10 | { |
| 11 | C* alloc; |
| 12 | __transaction_atomic { |
| 13 | alloc = new C; |
| 14 | } |
| 15 | alloc->l = 2; |
| 16 | |
| 17 | return 0; |
| 18 | } |
| 19 | |
| 20 | /* { dg-final { scan-assembler-not "_ITM_getTMCloneOrIrrevocable" } } */ |