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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [arm/] [sync-1.c] - Blame information for rev 714

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

Line No. Rev Author Line
1 691 jeremybenn
 
2
/* { dg-do run { target sync_int_long } } */
3
/* { dg-options "-O2" } */
4
 
5
volatile int mem;
6
 
7
int
8
bar (int x, int y)
9
{
10
  if (x)
11
    __sync_fetch_and_add(&mem, y);
12
  return 0;
13
}
14
 
15
extern void abort (void);
16
 
17
int
18
main (int argc, char *argv[])
19
{
20
  mem = 0;
21
  bar (0, 1);
22
  bar (1, 1);
23
  if (mem != 1)
24
    abort ();
25
  return 0;
26
}

powered by: WebSVN 2.1.0

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