1
1
// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s
2
- extern " C" float sinf (float );
3
- extern " C" float cosf (float );
4
- extern " C" float floorf (float );
5
- extern " C" float logf (float );
6
- extern " C" float nearbyintf (float );
7
- extern " C" float rintf (float );
8
- extern " C" float roundf (float );
9
- extern " C" float truncf (float );
10
- extern " C" float copysignf (float , float );
2
+ extern " C" float sinf (float );
3
+ extern " C" float cosf (float );
4
+ extern " C" float floorf (float );
5
+ extern " C" float logf (float );
6
+ extern " C" float nearbyintf (float );
7
+ extern " C" float rintf (float );
8
+ extern " C" float roundf (float );
9
+ extern " C" float truncf (float );
10
+ extern " C" float copysignf (float , float );
11
11
extern " C" double sin (double );
12
12
extern " C" double cos (double );
13
13
extern " C" double floor (double );
@@ -26,42 +26,42 @@ int main() {
26
26
kernel<class kernel_function >([=]() {
27
27
int acc[1 ] = {5 };
28
28
acc[0 ] *= 2 ;
29
- acc[0 ] += (int )truncf (1 .0f ); // expected-no-error
30
- acc[0 ] += (int )trunc (1.0 ); // expected-no-error
31
- acc[0 ] += (int )roundf (1 .0f ); // expected-no-error
32
- acc[0 ] += (int )round (1.0 ); // expected-no-error
33
- acc[0 ] += (int )rintf (1 .0f ); // expected-no-error
34
- acc[0 ] += (int )rint (1.0 ); // expected-no-error
35
- acc[0 ] += (int )nearbyintf (0 .5f ); // expected-no-error
36
- acc[0 ] += (int )nearbyint (0.5 ); // expected-no-error
37
- acc[0 ] += (int )floorf (0 .5f ); // expected-no-error
38
- acc[0 ] += (int )floor (0.5 ); // expected-no-error
39
- acc[0 ] += (int )copysignf (1 .0f , -0 .5f ); // expected-no-error
40
- acc[0 ] += (int )copysign (1.0 , -0.5 ); // expected-no-error
41
- acc[0 ] += (int )sinf (1 .0f ); // expected-no-error
42
- acc[0 ] += (int )sin (1.0 ); // expected-no-error
43
- acc[0 ] += (int )__builtin_sinf (1 .0f ); // expected-no-error
44
- acc[0 ] += (int )__builtin_sin (1.0 ); // expected-no-error
45
- acc[0 ] += (int )cosf (1 .0f ); // expected-no-error
46
- acc[0 ] += (int )cos (1.0 ); // expected-no-error
47
- acc[0 ] += (int )__builtin_cosf (1 .0f ); // expected-no-error
48
- acc[0 ] += (int )__builtin_cos (1.0 ); // expected-no-error
49
- acc[0 ] += (int )logf (1 .0f ); // expected-no-error
50
- acc[0 ] += (int )log (1.0 ); // expected-no-error
51
- acc[0 ] += (int )__builtin_truncf (1 .0f ); // expected-no-error
52
- acc[0 ] += (int )__builtin_trunc (1.0 ); // expected-no-error
53
- acc[0 ] += (int )__builtin_rintf (1 .0f ); // expected-no-error
54
- acc[0 ] += (int )__builtin_rint (1.0 ); // expected-no-error
55
- acc[0 ] += (int )__builtin_nearbyintf (0 .5f ); // expected-no-error
56
- acc[0 ] += (int )__builtin_nearbyint (0.5 ); // expected-no-error
57
- acc[0 ] += (int )__builtin_floorf (0 .5f ); // expected-no-error
58
- acc[0 ] += (int )__builtin_floor (0.5 ); // expected-no-error
59
- acc[0 ] += (int )__builtin_copysignf (1 .0f , -0 .5f ); // expected-no-error
60
- acc[0 ] += (int )__builtin_logf (1 .0f ); // expected-no-error
61
- acc[0 ] += (int )__builtin_log (1.0 ); // expected-no-error
62
- acc[0 ] += (int )__builtin_fabsl (-1.0 ); // expected-error{{builtin is not supported on this target}}
63
- acc[0 ] += (int )__builtin_cosl (-1.0 ); // expected-error{{builtin is not supported on this target}}
64
- acc[0 ] += (int )__builtin_powl (-1.0 , 10.0 ); // expected-error{{builtin is not supported on this target}}
29
+ acc[0 ] += (int )truncf (1 .0f ); // expected-no-error
30
+ acc[0 ] += (int )trunc (1.0 ); // expected-no-error
31
+ acc[0 ] += (int )roundf (1 .0f ); // expected-no-error
32
+ acc[0 ] += (int )round (1.0 ); // expected-no-error
33
+ acc[0 ] += (int )rintf (1 .0f ); // expected-no-error
34
+ acc[0 ] += (int )rint (1.0 ); // expected-no-error
35
+ acc[0 ] += (int )nearbyintf (0 .5f ); // expected-no-error
36
+ acc[0 ] += (int )nearbyint (0.5 ); // expected-no-error
37
+ acc[0 ] += (int )floorf (0 .5f ); // expected-no-error
38
+ acc[0 ] += (int )floor (0.5 ); // expected-no-error
39
+ acc[0 ] += (int )copysignf (1 .0f , -0 .5f ); // expected-no-error
40
+ acc[0 ] += (int )copysign (1.0 , -0.5 ); // expected-no-error
41
+ acc[0 ] += (int )sinf (1 .0f ); // expected-no-error
42
+ acc[0 ] += (int )sin (1.0 ); // expected-no-error
43
+ acc[0 ] += (int )__builtin_sinf (1 .0f ); // expected-no-error
44
+ acc[0 ] += (int )__builtin_sin (1.0 ); // expected-no-error
45
+ acc[0 ] += (int )cosf (1 .0f ); // expected-no-error
46
+ acc[0 ] += (int )cos (1.0 ); // expected-no-error
47
+ acc[0 ] += (int )__builtin_cosf (1 .0f ); // expected-no-error
48
+ acc[0 ] += (int )__builtin_cos (1.0 ); // expected-no-error
49
+ acc[0 ] += (int )logf (1 .0f ); // expected-no-error
50
+ acc[0 ] += (int )log (1.0 ); // expected-no-error
51
+ acc[0 ] += (int )__builtin_truncf (1 .0f ); // expected-no-error
52
+ acc[0 ] += (int )__builtin_trunc (1.0 ); // expected-no-error
53
+ acc[0 ] += (int )__builtin_rintf (1 .0f ); // expected-no-error
54
+ acc[0 ] += (int )__builtin_rint (1.0 ); // expected-no-error
55
+ acc[0 ] += (int )__builtin_nearbyintf (0 .5f ); // expected-no-error
56
+ acc[0 ] += (int )__builtin_nearbyint (0.5 ); // expected-no-error
57
+ acc[0 ] += (int )__builtin_floorf (0 .5f ); // expected-no-error
58
+ acc[0 ] += (int )__builtin_floor (0.5 ); // expected-no-error
59
+ acc[0 ] += (int )__builtin_copysignf (1 .0f , -0 .5f ); // expected-no-error
60
+ acc[0 ] += (int )__builtin_logf (1 .0f ); // expected-no-error
61
+ acc[0 ] += (int )__builtin_log (1.0 ); // expected-no-error
62
+ acc[0 ] += (int )__builtin_fabsl (-1.0 ); // expected-error{{builtin is not supported on this target}}
63
+ acc[0 ] += (int )__builtin_cosl (-1.0 ); // expected-error{{builtin is not supported on this target}}
64
+ acc[0 ] += (int )__builtin_powl (-1.0 , 10.0 ); // expected-error{{builtin is not supported on this target}}
65
65
});
66
66
return 0 ;
67
67
}
0 commit comments