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-1.c] - Blame information for rev 313

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
int
10
main (void)
11
{
12
#pragma omp parallel
13
  {
14
    int array[40];
15
    int i;
16
    for (i = 0; i < sizeof array / sizeof array[0]; i++)
17
      array[i] = 0x55555555;
18
 
19
#pragma omp for schedule(dynamic)
20
    for (i = 0; i < 50; i++)
21
#pragma omp task shared(array)
22
      {
23
        int j;
24
        for (j = 0; j < sizeof array / sizeof array[0]; j++)
25
          if (array[j] != 0x55555555)
26
#pragma omp atomic
27
            err++;
28
      }
29
  }
30
  if (err)
31
    abort ();
32
  return 0;
33
}

powered by: WebSVN 2.1.0

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