OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tm/] [noexcept-4.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-fgnu-tm -O -std=c++0x -fdump-tree-tmmark -fdump-tree-tmlower" }
3
 
4
// Similar to noexcept-1.C but without an explicit (true) for noexcept.
5
 
6
struct TrueFalse
7
{
8
  static constexpr bool v() { return true; }
9
};
10
 
11
int global;
12
 
13
template int foo()
14
{
15
  __transaction_atomic noexcept { global += 1; }
16
  return __transaction_atomic noexcept (global + 2)
17
         + __transaction_atomic noexcept (global + 3);
18
}
19
 
20
int f1()
21
{
22
  return foo();
23
}
24
 
25
int f3()
26
{
27
  __transaction_atomic noexcept { global += 4; }
28
  return __transaction_atomic noexcept (global + 5)
29
         + __transaction_atomic noexcept (global + 6);
30
}
31
 
32
/* { dg-final { scan-tree-dump-times "eh_must_not_throw" 6 "tmlower" } } */
33
/* { dg-final { scan-tree-dump-times "ITM_RU" 6 "tmmark" } } */
34
/* { dg-final { cleanup-tree-dump "tmmark" } } */
35
/* { dg-final { cleanup-tree-dump "tmlower" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.