gcc/testsuite/g++.dg/tm/noexcept-5.C
raw| 1 | // { dg-do compile { target c++11 } } |
| 2 | // { dg-options "-fgnu-tm -O -fdump-tree-tmmark -fdump-tree-tmlower -Wno-terminate" } |
| 3 | |
| 4 | int global; |
| 5 | |
| 6 | void f2(int x) |
| 7 | { |
| 8 | __transaction_atomic |
| 9 | { |
| 10 | __transaction_atomic noexcept(true) |
| 11 | { |
| 12 | global += 1; |
| 13 | if (x) |
| 14 | throw 23; |
| 15 | } |
| 16 | } |
| 17 | } |
| 18 | /* { dg-final { scan-tree-dump-times "eh_must_not_throw" 2 "tmlower" } } */ |
| 19 | /* { dg-final { scan-tree-dump-times "ITM_RU" 1 "tmmark" } } */ |