clang/test/SemaSYCL/bf16.cpp
raw| 1 | // RUN: %clang_cc1 -triple spir64 -aux-triple x86_64-unknown-linux-gnu -fsycl-is-device -verify -fsyntax-only %s |
| 2 | // expected-no-diagnostics |
| 3 | |
| 4 | template <typename Name, typename Func> |
| 5 | __attribute__((sycl_kernel)) void kernel(const Func &kernelFunc) { |
| 6 | kernelFunc(); |
| 7 | } |
| 8 | |
| 9 | void host_ok(void) { |
| 10 | __bf16 A; |
| 11 | } |
| 12 | |
| 13 | int main() |
| 14 | { host_ok(); |
| 15 | __bf16 var; |
| 16 | kernel<class variables>([=]() { |
| 17 | (void)var; |
| 18 | int B = sizeof(__bf16); |
| 19 | }); |
| 20 | |
| 21 | return 0; |
| 22 | } |
| 23 |