Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / gcc.dg / gomp / appendix-a / a.32.1.c
blob89d841c7956547de09038cb15eb7e37306c3d298
1 /* { dg-do compile } */
2 /* { dg-require-effective-target tls_native } */
4 #include <stdlib.h>
5 float *work;
6 int size;
7 float tol;
8 void build (void);
9 #pragma omp threadprivate(work,size,tol)
10 void
11 a32 (float t, int n)
13 tol = t;
14 size = n;
15 #pragma omp parallel copyin(tol,size)
17 build ();
20 void
21 build ()
23 int i;
24 work = (float *) malloc (sizeof (float) * size);
25 for (i = 0; i < size; ++i)
26 work[i] = tol;