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

Subversion Repositories openrisc_me

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

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;
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
#pragma omp parallel
26
  {
27
    int array[40];
28
    int i;
29
    for (i = 0; i < sizeof array / sizeof array[0]; i++)
30
      array[i] = 0x55555555;
31
 
32
#pragma omp for schedule (dynamic)
33
    for (i = 0; i < 50; i++)
34
      foo (array);
35
  }
36
  if (err)
37
    abort ();
38
  return 0;
39
}

powered by: WebSVN 2.1.0

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