repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merged with mainline at revision 128810.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
gomp
/
appendix-a
/
a.32.1.c
blob
89d841c7956547de09038cb15eb7e37306c3d298
1
/* { dg-do compile } */
2
/* { dg-require-effective-target tls_native } */
3
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
)
12
{
13
tol
=
t
;
14
size
=
n
;
15
#pragma omp parallel copyin(tol,size)
16
{
17
build
();
18
}
19
}
20
void
21
build
()
22
{
23
int
i
;
24
work
= (
float
*)
malloc
(
sizeof
(
float
) *
size
);
25
for
(
i
=
0
;
i
<
size
; ++
i
)
26
work
[
i
] =
tol
;
27
}