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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [c-c++-common/] [tm/] [safe-2.c] - Rev 698

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

/* { dg-do compile } */
/* { dg-options "-fgnu-tm" } */
 
void mco(void) __attribute__((transaction_may_cancel_outer));
 
void
f(void)
{
  mco();			/* { dg-error "" } */
  __transaction_atomic {
    mco();			/* { dg-error "" } */
  }
  __transaction_relaxed {
    mco();			/* { dg-error "" } */
  }
  __transaction_atomic [[outer]] {
    mco();
  }
  __transaction_atomic [[outer]] {
    __transaction_atomic {
      __transaction_atomic {
	__transaction_atomic {
	  mco();
	}
      }
    }
  }
}
 
void __attribute__((transaction_may_cancel_outer))
g(void)
{
  mco();
  __transaction_atomic {
    __transaction_atomic {
      __transaction_atomic {
	__transaction_atomic {
	  mco();
	}
      }
    }
  }
}
 

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.