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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [gomp/] [appendix-a/] [a.32.1.c] - Rev 689

Compare with Previous | Blame | View Log

/* { dg-do compile } */
/* { dg-require-effective-target tls } */
 
#include <stdlib.h>
float *work;
int size;
float tol;
void build (void);
#pragma omp threadprivate(work,size,tol)
void
a32 (float t, int n)
{
  tol = t;
  size = n;
#pragma omp parallel copyin(tol,size)
  {
    build ();
  }
}
void
build ()
{
  int i;
  work = (float *) malloc (sizeof (float) * size);
  for (i = 0; i < size; ++i)
    work[i] = tol;
}
 

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.