aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/tm/noexcept-5.C
blob: 42674329170bfc34edc321252e6c175929df103e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do compile { target c++11 } }
// { dg-options "-fgnu-tm -O -fdump-tree-tmmark -fdump-tree-tmlower" }

int global;

void f2(int x)
{
  __transaction_atomic
    {
      __transaction_atomic noexcept(true)
        {
	  global += 1;
	  if (x)
	      throw 23;
        }
    }
}
/* { dg-final { scan-tree-dump-times "eh_must_not_throw" 1 "tmlower" } } */
/* { dg-final { scan-tree-dump-times "ITM_RU" 1 "tmmark" } } */
/* { dg-final { cleanup-tree-dump "tmmark" } } */
/* { dg-final { cleanup-tree-dump "tmlower" } } */