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
Fix xfail for 32-bit hppa*-*-* in gcc.dg/pr84877.c
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.c++
/
target-this-5.C
blob
e71c566687d71595f43858dffd45827c1d941bd5
1
extern "C" void abort ();
2
3
template<typename T>
4
struct S
5
{
6
T a, b, c, d;
7
8
T sum (void)
9
{
10
T val = 0;
11
val += a + b + this->c + this->d;
12
return val;
13
}
14
15
T sum_offload (void)
16
{
17
T val = 0;
18
#pragma omp target map(val)
19
val += a + b + this->c + this->d;
20
return val;
21
}
22
};
23
24
int main (void)
25
{
26
S<int> s = { 1, 2, 3, 4 };
27
if (s.sum () != s.sum_offload ())
28
abort ();
29
return 0;
30
}