/* { dg-do compile { target c++11 } } */ /* { dg-options "-Wall" } */ // Check that we can compare vector types that really are the same through // typedefs. typedef float v4f __attribute__((vector_size(4*sizeof(float)))); template void eat (T&&) {} template struct Vec { typedef T type __attribute__((vector_size(4*sizeof(T)))); template static void fun (type const& t, U& u) { eat (t > u); } }; long long f (v4f *x, v4f const *y) { return ((*x < *y) | (*x <= *y))[2]; } int main () { v4f x = {0,1,2,3}; Vec::type f = {-1,5,2,3.1}; auto c = (x == f) == (x >= x); eat (c[3]); Vec::fun (f, x); Vec::fun (x, f); Vec::fun (f, f); Vec::fun (x, x); }