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

Subversion Repositories openrisc

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

Go to most recent revision | 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
struct TrueFalse
5
{
6
  static constexpr bool v() { return true; }
7
};
8
 
9
int global;
10
 
11
template int foo()
12
{
13
  __transaction_atomic noexcept(T::v()) { global += 1; }
14
  return __transaction_atomic noexcept(T::v()) (global + 2);
15
}
16
 
17
int f1()
18
{
19
  return foo();
20
}
21
 
22
int f2()
23
{
24
  return __transaction_atomic noexcept(true) (global + 3)
25
         + __transaction_atomic noexcept(TrueFalse::v()) (global + 4);
26
}
27
 
28
int f3()
29
{
30
  __transaction_atomic noexcept(true) { global += 5; }
31
  __transaction_atomic noexcept(TrueFalse::v()) { global += 6; }
32
  return global;
33
}
34
 
35
/* { dg-final { scan-tree-dump-times "eh_must_not_throw" 6 "tmlower" } } */
36
/* { dg-final { scan-tree-dump-times "ITM_RU" 6 "tmmark" } } */
37
/* { dg-final { cleanup-tree-dump "tmmark" } } */
38
/* { 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.