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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tm/] [pr46654.c] - Rev 708

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

/* { dg-do compile } */
/* { dg-options "-fgnu-tm" } */
 
extern void baz(int);
 
int y;
void foo(volatile int x)
{
  __transaction_atomic {
    x = 5; /* { dg-error "invalid volatile use of 'x' inside transaction" } */
    x += y;
    y++;
  }
  baz(x);
}
 
 
volatile int i = 0;
 
void george()
{
  __transaction_atomic {
   if (i == 2) /* { dg-error "invalid volatile use of 'i' inside transaction" } */
     i = 1;
  }
}
 

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.