1 /* { dg-do compile { target c++11 } } */
2 /* { dg-options "-Wall -Wno-tautological-compare" } */
4 // Check that we can compare vector types that really are the same through
7 typedef float v4f __attribute__((vector_size(4*sizeof(float))));
9 template <class T> void eat (T&&) {}
11 template <class T, int n>
14 typedef T type __attribute__((vector_size(4*sizeof(T))));
17 static void fun (type const& t, U& u) { eat (t > u); }
21 f (v4f *x, v4f const *y)
23 return ((*x < *y) | (*x <= *y))[2];
29 Vec<const volatile float,4>::type f = {-1,5,2,3.1};
30 auto c = (x == f) == (x >= x);
32 Vec<const volatile float,4>::fun (f, x);
33 Vec<const volatile float,4>::fun (x, f);
34 Vec<const volatile float,4>::fun (f, f);
35 Vec<const volatile float,4>::fun (x, x);