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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tm/] [pr46270.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" }
3
 
4
#include 
5
class Game
6
{
7
public:
8
  struct BuildProject
9
  {
10
    int posX;
11
  };
12
  std::list buildProjects;
13
};
14
 
15
static Game game;
16
static std::list::iterator> erasableBuildProjects;
17
 
18
static void *buildProjectSyncStepConcurrently(int id, int localTeam)
19
{
20
  __transaction_relaxed {
21
    std::list::iterator>::iterator it
22
      = erasableBuildProjects.begin();
23
    game.buildProjects.erase( (std::list
24
                               ::iterator) *it);
25
  }
26
  return 0;
27
}

powered by: WebSVN 2.1.0

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