* config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
[official-gcc.git] / gcc / testsuite / g++.dg / tm / pr46270.C
blob291e620a38792d0f221f46f03cc2c2954bf33a69
1 // { dg-do compile }
2 // { dg-options "-fgnu-tm" }
4 #include <list>
5 class Game
7 public:
8   struct BuildProject
9   {
10     int posX;
11   };
12   std::list<BuildProject> buildProjects;
15 static Game game;
16 static std::list<std::list<Game::BuildProject>::iterator> erasableBuildProjects;
18 static void *buildProjectSyncStepConcurrently(int id, int localTeam)
20   __transaction_relaxed {
21     std::list<std::list<Game::BuildProject>::iterator>::iterator it
22       = erasableBuildProjects.begin();
23     game.buildProjects.erase( (std::list<Game::BuildProject>
24                                ::iterator) *it);
25   }
26   return 0;