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/] [pr30421.c] - Rev 816

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

/* PR middle-end/30421 */
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -Wall" } */
 
int
foo ()
{
  int a = 0, i;
 
#pragma omp parallel for firstprivate(a) lastprivate(a)
  for (i = 0; i < 10; i++)
    a += i;
 
  return a;
}
 
int
bar ()
{
  int a = 0, i;
 
#pragma omp parallel for firstprivate(a) lastprivate(a) schedule(static, 2)
  for (i = 0; i < 10; i++)
    a += i;
 
  return a;
}
 
int
baz ()
{
  int a = 0, i;
 
#pragma omp parallel for firstprivate(a) lastprivate(a) schedule(dynamic)
  for (i = 0; i < 10; i++)
    a += i;
 
  return a;
}
 

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

powered by: WebSVN 2.1.0

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