// RUN: %clang_cc1 %s -emit-llvm -DBITS=32 -triple spir-unknown-unknown -finclude-default-header -fdeclare-opencl-builtins -o - -verify -fsyntax-only
// RUN: %clang_cc1 %s -emit-llvm -DBITS=64 -triple spir64-unknown-unknown -finclude-default-header -fdeclare-opencl-builtins -o - -verify -fsyntax-only
char3 f1; // expected-error{{invalid reinterpretation: sizes of 'char3' (vector of 3 'char' values) and '__private char16' (vector of 16 'char' values) must match}}
}
char16 f3 {
return __builtin_astype; // expected-error{{invalid reinterpretation: sizes of 'char16' (vector of 16 'char' values) and '__private int' must match}}
}
void foo {
char src = 1;
int dst = as_int; // expected-error{{invalid reinterpretation: sizes of 'int' and '__private char' must match}}
}
void target_dependent {
size_t size1 = as_size_t;
#if BITS == 64
// expected-error@-2{{sizes of 'size_t' and '__private int' must match}}
#endif
size_t size2 = as_size_t;
#if BITS == 32
// expected-error@-2{{sizes of 'size_t' and '__private long' must match}}
#endif
}
{
return __builtin_astype