gcc/c-family:
[official-gcc.git] / gcc / testsuite / c-c++-common / opaque-vector.c
blobcad266e893bea3d5eed8c3e4a1e8cb5e616d7801
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__)
20 T_TEST(long double)
21 #endif