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
c-family: Enable -fpermissive for C and ObjC
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.c++
/
pr81314.C
blob
afe89438bd3f1f95a4159fd755d05dc9148dbba1
1
// PR c++/81314
2
// { dg-do link }
3
4
template <int N>
5
struct S {
6
S () { s = 0; }
7
S (const S &x) { s = x.s; }
8
~S () {}
9
int s;
10
};
11
12
void
13
foo (S<2> &x)
14
{
15
#pragma omp taskloop
16
for (int i = 0; i < 100; ++i)
17
x.s++;
18
}
19
20
void
21
bar (S<3> &x)
22
{
23
#pragma omp task
24
x.s++;
25
}
26
27
int
28
main ()
29
{
30
S<2> s;
31
S<3> t;
32
#pragma omp parallel
33
#pragma omp master
34
{
35
foo (s);
36
bar (t);
37
}
38
}