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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [gomp/] [pr30421.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* PR middle-end/30421 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -fopenmp -Wall" } */
4
 
5
int
6
foo ()
7
{
8
  int a = 0, i;
9
 
10
#pragma omp parallel for firstprivate(a) lastprivate(a)
11
  for (i = 0; i < 10; i++)
12
    a += i;
13
 
14
  return a;
15
}
16
 
17
int
18
bar ()
19
{
20
  int a = 0, i;
21
 
22
#pragma omp parallel for firstprivate(a) lastprivate(a) schedule(static, 2)
23
  for (i = 0; i < 10; i++)
24
    a += i;
25
 
26
  return a;
27
}
28
 
29
int
30
baz ()
31
{
32
  int a = 0, i;
33
 
34
#pragma omp parallel for firstprivate(a) lastprivate(a) schedule(dynamic)
35
  for (i = 0; i < 10; i++)
36
    a += i;
37
 
38
  return a;
39
}

powered by: WebSVN 2.1.0

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