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

Subversion Repositories openrisc

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

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 -fdump-tree-tmmark" }
3
 
4
struct TrueFalse
5
{
6
  static bool v() { return true; }
7
};
8
 
9
int global;
10
 
11
template int foo()
12
{
13
  __transaction_atomic { global += 2; }
14
  return __transaction_atomic (global + 1);
15
}
16
 
17
template int bar() __transaction_atomic
18
{
19
  return global + 3;
20
}
21
 
22
template void bar2() __transaction_atomic
23
{
24
  global += 4;
25
}
26
 
27
int f1()
28
{
29
  bar2();
30
  return foo() + bar();
31
}
32
 
33
/* 4 transactions overall, two of them write to global:  */
34
/* { dg-final { scan-tree-dump-times "ITM_RU4\\s*\\(&global" 4 "tmmark" } } */
35
/* { dg-final { scan-tree-dump-times "ITM_WU4\\s*\\(&global" 2 "tmmark" } } */
36
/* { dg-final { cleanup-tree-dump "tmmark" } } */

powered by: WebSVN 2.1.0

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