diff options
Diffstat (limited to 'test/SemaTemplate/instantiate-expr-3.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-expr-3.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-expr-3.cpp b/test/SemaTemplate/instantiate-expr-3.cpp index bc1097c5aa..a17897b085 100644 --- a/test/SemaTemplate/instantiate-expr-3.cpp +++ b/test/SemaTemplate/instantiate-expr-3.cpp @@ -81,3 +81,19 @@ struct TypesCompatible0 { }; template struct TypesCompatible0<int, const int, true>; + +// --------------------------------------------------------------------- +// __builtin_shufflevector +// --------------------------------------------------------------------- +typedef __attribute__(( ext_vector_type(2) )) double double2; +template<typename T, typename U, int N, int M> +struct ShuffleVector0 { + void f(T t, U u, double2 a, double2 b) { + (void)__builtin_shufflevector(t, u, N, M); // expected-error{{index}} + (void)__builtin_shufflevector(a, b, N, M); + (void)__builtin_shufflevector(a, b, 2, 1); + } +}; + +template struct ShuffleVector0<double2, double2, 2, 1>; +template struct ShuffleVector0<double2, double2, 4, 3>; // expected-note{{instantiation}} |