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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tm/] [pr46269.C] - Rev 764

Go to most recent revision | Compare with Previous | Blame | View Log

// { dg-do compile }
// { dg-options "-fgnu-tm" }

static inline void atomic_exchange_and_add()
{
  __asm__  ("");
}

template<class T> class shared_ptr
{
public:
  shared_ptr( T * p )
  {
    atomic_exchange_and_add();
  }
};

class BuildingCompletedEvent
{
  public:
  __attribute__((transaction_callable)) void updateBuildingSite(void);
  __attribute__((transaction_pure)) BuildingCompletedEvent();
};

void BuildingCompletedEvent::updateBuildingSite(void)
{
  shared_ptr<BuildingCompletedEvent> event(new BuildingCompletedEvent());
}

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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