blob: 1cff1c8d0c5c297b2be8f7ebbf781655d8ea7a8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/* { dg-skip-if "" { *-*-* } } */
/* Used by target-same-name-2.c */
#include <complex>
template<typename T>
int
test_map ()
{
std::complex<T> a(2, 1), a_check;
#pragma omp target map(from : a_check)
{
a_check = a;
}
if (a == a_check)
return 42;
return 0;
}
template<typename T>
static int
test_map_static ()
{
std::complex<T> a(-4, 5), a_check;
#pragma omp target map(from : a_check)
{
a_check = a;
}
if (a == a_check)
return 441;
return 0;
}
int
test_a ()
{
int res = test_map<float>();
if (res != 42)
__builtin_abort ();
return res;
}
int
test_a2 ()
{
int res = test_map_static<float>();
if (res != 441)
__builtin_abort ();
return res;
}
|