PR c++/67273
[official-gcc.git] / gcc / testsuite / c-c++-common / opaque-vector.c
blobbac3497be3e2fad871065ca12363cac6ce27c914
1 #define B_TEST(TYPE) { TYPE v __attribute__((vector_size(16))); (void)((v < v) < v); }
2 #ifdef __cplusplus
3 #define T_TEST(TYPE) { TYPE s; TYPE v __attribute__((vector_size(16))); __typeof((v<v)[0]) iv __attribute__((vector_size(16))); (void)((iv ? s : s) < v); }
4 #else
5 #define T_TEST(TYPE)
6 #endif
7 #define T(TYPE) B_TEST(TYPE) T_TEST(TYPE)
9 void f ()
11 T(short)
12 T(int)
13 T(long)
14 T(long long)
16 T_TEST(float)
17 T_TEST(double)
18 /* Avoid trouble with non-power-of-two sizes. */
19 #if !defined(__i386__) && !defined(__x86_64__) && !defined(__m68k__) && !defined(__ia64__) && !defined(__hppa__)
20 T_TEST(long double)
21 #endif