| 1 |
/* { dg-do compile { target c++11 } } */ |
| 2 |
|
| 3 |
template <bool> struct enable_if {}; |
| 4 |
template <> struct enable_if<true> {typedef void type;}; |
| 5 |
template <class T> void f (T& v) { v = __builtin_shuffle (v, v); } |
| 6 |
template <class T> void g (T const&) {} |
| 7 |
template <class T> auto g (T const& x) -> typename enable_if<sizeof(__builtin_shuffle(x,x))!=2>::type {} |
| 8 |
typedef int v4i __attribute__((vector_size(4*sizeof(int)))); |
| 9 |
typedef float v4f __attribute__((vector_size(4*sizeof(float)))); |
| 10 |
int main(){ |
| 11 |
v4i a = {1,2,3,0}; |
| 12 |
f(a); |
| 13 |
v4f b = {1,2,3,0}; |
| 14 |
g(b); |
| 15 |
} |