// RUN: %clang_cc1 -fdeclare-opencl-builtins -finclude-default-header %s -cl-std=clc++ -verify
// Test as_type, which is defined in terms of __builtin_astype.
template <typename T>
auto templated_astype;
// expected-error@-1{{invalid reinterpretation: sizes of 'int2' and '__private int' must match}}
}
auto test_long { return templated_astype; }
auto neg_test_int { return templated_astype; }
// expected-note@-1{{in instantiation of function template specialization 'templated_astype<int>' requested here}}
auto test_short4 { return templated_astype; }
// Test __builtin_astype.
template <typename T>
auto templated_builtin_astype {
return __builtin_astype;
}
auto test_builtin { return templated_builtin_astype; }
{
return as_int2