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

Subversion Repositories openrisc

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

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-tmedge --param tm-max-aggregate-size=1" } */
3
 
4
/* Test thread-local memory optimizations: logging function.  */
5
 
6
struct large { int x[100]; };
7
struct large bark();
8
extern int test (void) __attribute__((transaction_safe));
9
 
10
int f()
11
{
12
  int i = readint();
13
  struct large lala = bark();
14
  __transaction_atomic {
15
    lala.x[55] = 666;
16
    if (test())
17
      __transaction_cancel;
18
  }
19
  return lala.x[i];
20
}
21
 
22
/* { dg-final { scan-tree-dump-times "ITM_LU\[0-9\] \\\(&lala.x\\\[55\\\]" 1 "tmedge" } } */
23
/* { dg-final { cleanup-tree-dump "tmedge" } } */

powered by: WebSVN 2.1.0

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