OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [libgomp/] [testsuite/] [libgomp.c/] [pr39591-3.c] - Blame information for rev 469

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

Line No. Rev Author Line
1 273 jeremybenn
/* PR other/39591 */
2
/* { dg-do run } */
3
/* { dg-options "-O2" } */
4
 
5
extern void abort (void);
6
 
7
int err, a[40];
8
 
9
void __attribute__((noinline))
10
foo (int *array)
11
{
12
#pragma omp task
13
  {
14
    int j;
15
    for (j = 0; j < sizeof array / sizeof array[0]; j++)
16
      if (array[j] != 0x55555555)
17
#pragma omp atomic
18
        err++;
19
  }
20
}
21
 
22
int
23
main (void)
24
{
25
  int k;
26
  for (k = 0; k < sizeof a / sizeof a[0]; k++)
27
    a[k] = 0x55555555;
28
 
29
#pragma omp parallel
30
  {
31
    int i;
32
 
33
#pragma omp for schedule (dynamic)
34
    for (i = 0; i < 50; i++)
35
      foo (a);
36
  }
37
  if (err)
38
    abort ();
39
  return 0;
40
}

powered by: WebSVN 2.1.0

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