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
libstdc++: AIX xfail for_overwrite.cc testcase
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.c++
/
pr56217.C
blob
19da9185350037431f17e0e914d1bf82bf85a9e9
1
// PR middle-end/56217
2
// { dg-do run }
3
// { dg-options "-std=c++0x" }
4
5
extern "C" void abort ();
6
7
template <typename T>
8
struct ptr {
9
T *p;
10
ptr () : p () {}
11
ptr (ptr &) = delete;
12
ptr (ptr &&o) : p(o) {}
13
operator T * () { return p; }
14
};
15
16
int a[6] = { 100, 101, 102, 103, 104, 105 };
17
18
static ptr<int>
19
f ()
20
{
21
ptr<int> pt;
22
#pragma omp task shared (pt)
23
pt.p = a + 2;
24
#pragma omp taskwait
25
return pt;
26
}
27
28
int
29
main ()
30
{
31
ptr<int> pt;
32
#pragma omp parallel
33
#pragma omp single
34
if (f () != a + 2 || *f () != 102)
35
abort ();
36
}