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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tm/] [memopt-3.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-fgnu-tm -O -fdump-tree-tmmark" } */
3
 
4
struct large { int x[100]; };
5
extern int test(void) __attribute__((transaction_safe));
6
 
7
int f()
8
{
9
  int i = readint();
10
  struct large lala = { 0 };
11
  __transaction_atomic {
12
    lala.x[i] = 666;
13
    if (test())
14
      __transaction_cancel;
15
  }
16
  return lala.x[0];
17
}
18
 
19
/* { dg-final { scan-tree-dump-times "logging: lala.x\\\[i_1\\\]" 1 "tmmark" } } */
20
/* { dg-final { cleanup-tree-dump "tmmark" } } */

powered by: WebSVN 2.1.0

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