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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tm/] [noexcept-3.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
// Same as noexcept-1.C but all noexcepts are false.
5
 
6
struct TrueFalse
7
{
8
  static constexpr bool v() { return false; }
9
};
10
 
11
int global;
12
 
13
template int foo()
14
{
15
  __transaction_atomic noexcept(T::v()) { global += 1; }
16
  return __transaction_atomic noexcept(T::v()) (global + 2);
17
}
18
 
19
int f1()
20
{
21
  return foo();
22
}
23
 
24
int f2()
25
{
26
  return __transaction_atomic noexcept(false) (global + 3)
27
         + __transaction_atomic noexcept(TrueFalse::v()) (global + 4);
28
}
29
 
30
int f3()
31
{
32
  __transaction_atomic noexcept(false) { global += 5; }
33
  __transaction_atomic noexcept(TrueFalse::v()) { global += 6; }
34
  return global;
35
}
36
 
37
/* { dg-final { scan-tree-dump-times "eh_must_not_throw" 0 "tmlower" } } */
38
/* { dg-final { scan-tree-dump-times "ITM_RU" 6 "tmmark" } } */
39
/* { dg-final { cleanup-tree-dump "tmmark" } } */
40
/* { 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.