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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [gomp/] [atomic-10.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR middle-end/28046 */
2
/* { dg-do compile } */
3
/* { dg-options "-fopenmp -fdump-tree-ompexp" } */
4
 
5
int a[3], b;
6
struct C { int x; int y; } c;
7
 
8
int bar (void), *baz (void);
9
 
10
void
11
foo (void)
12
{
13
#pragma omp atomic
14
  a[2] += bar ();
15
#pragma omp atomic
16
  b += bar ();
17
#pragma omp atomic
18
  c.y += bar ();
19
#pragma omp atomic
20
  *baz () += bar ();
21
}
22
 
23
/* { dg-final { scan-tree-dump-times "__sync_fetch_and_add" 4 "ompexp" { target i?86-*-* x86_64-*-* ia64-*-* powerpc*-*-* alpha*-*-* } } } */
24
/* { dg-final { cleanup-tree-dump "ompexp" } } */

powered by: WebSVN 2.1.0

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