aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/ext/pr57509.C
blob: b89d9094d1d8db045f7f317dc41cac588df9e119 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile { target c++11 } } */

template <bool> struct enable_if {};
template <> struct enable_if<true> {typedef void type;};
template <class T> void f (T& v) { v = __builtin_shuffle (v, v); }
template <class T> void g (T const&) {}
template <class T> auto g (T const& x) -> typename enable_if<sizeof(__builtin_shuffle(x,x))!=2>::type {}
typedef int v4i __attribute__((vector_size(4*sizeof(int))));
typedef float v4f __attribute__((vector_size(4*sizeof(float))));
int main(){
  v4i a = {1,2,3,0};
  f(a);
  v4f b = {1,2,3,0};
  g(b);
}