1 // RUN: %clang_cc1 -fsycl-is-device -triple spir64 -verify -fsyntax-only %s
3 thread_local
const int prohobit_ns_scope
= 0;
4 thread_local
int prohobit_ns_scope2
= 0;
5 thread_local
const int allow_ns_scope
= 0;
8 static const thread_local
int prohibit_static_member
;
9 static thread_local
int prohibit_static_member2
;
13 static const thread_local
int allow_static_member
;
17 // expected-error@+1{{thread-local storage is not supported for the current target}}
18 thread_local
const int prohibit_local
= 0;
19 // expected-error@+1{{thread-local storage is not supported for the current target}}
20 thread_local
int prohibit_local2
;
23 void bar() { thread_local
int allow_local
; }
26 // expected-note@+1 {{called by}}
28 // expected-error@+1 {{thread-local storage is not supported for the current target}}
29 (void)prohobit_ns_scope
;
30 // expected-error@+1 {{thread-local storage is not supported for the current target}}
31 (void)prohobit_ns_scope2
;
32 // expected-error@+1 {{thread-local storage is not supported for the current target}}
33 (void)S::prohibit_static_member
;
34 // expected-error@+1 {{thread-local storage is not supported for the current target}}
35 (void)S::prohibit_static_member2
;
38 template <typename name
, typename Func
>
39 __attribute__((sycl_kernel
))
40 // expected-note@+2 2{{called by}}
42 kernel_single_task(Func kernelFunc
) { kernelFunc(); }
45 // expected-note@+1 2{{called by}}
46 kernel_single_task
<class fake_kernel
>([]() { usage(); });