| 1 |
// { dg-do compile } |
| 2 |
// { dg-options "-fgnu-tm" } |
| 3 |
|
| 4 |
static inline void atomic_exchange_and_add() |
| 5 |
{ |
| 6 |
__asm__ (""); |
| 7 |
} |
| 8 |
|
| 9 |
template<class T> class shared_ptr |
| 10 |
{ |
| 11 |
public: |
| 12 |
shared_ptr( T * p ) |
| 13 |
{ |
| 14 |
atomic_exchange_and_add(); |
| 15 |
} |
| 16 |
}; |
| 17 |
|
| 18 |
class BuildingCompletedEvent |
| 19 |
{ |
| 20 |
public: |
| 21 |
__attribute__((transaction_callable)) void updateBuildingSite(void); |
| 22 |
__attribute__((transaction_pure)) BuildingCompletedEvent(); |
| 23 |
}; |
| 24 |
|
| 25 |
void BuildingCompletedEvent::updateBuildingSite(void) |
| 26 |
{ |
| 27 |
shared_ptr<BuildingCompletedEvent> event(new BuildingCompletedEvent()); |
| 28 |
} |
| 29 |
|