diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-08 06:16:24 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-08 06:16:24 +0000 |
commit | 73437615120de05275f9af5974f7ee261db9ba61 (patch) | |
tree | 0f2eee7eebbfbdf1341ac9855aa139be01e1a520 /gcc/testsuite/c-c++-common | |
parent | dd9940d23f9e9b8979289fa1bb9aa3ea5d4fdb72 (diff) | |
download | gcc-73437615120de05275f9af5974f7ee261db9ba61.tar.gz |
gcc/c-family:
* c-common.c (same_scalar_type_ignoring_signedness): Delete.
(vector_types_compatible_elements_p): New function.
* c-common.h: (same_scalar_type_ignoring_signedness): Delete
declaration.
(vector_types_compatible_elements_p): Declare.
gcc/c:
* c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
gcc/cp:
* typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.
gcc/testsuite:
* c-c++-common/opaque-vector.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202364 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/c-c++-common')
-rw-r--r-- | gcc/testsuite/c-c++-common/opaque-vector.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/opaque-vector.c b/gcc/testsuite/c-c++-common/opaque-vector.c new file mode 100644 index 00000000000..cad266e893b --- /dev/null +++ b/gcc/testsuite/c-c++-common/opaque-vector.c @@ -0,0 +1,22 @@ +#define B_TEST(TYPE) { TYPE v __attribute__((vector_size(16))); (void)((v < v) < v); } +#ifdef __cplusplus +#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); } +#else +#define T_TEST(TYPE) +#endif +#define T(TYPE) B_TEST(TYPE) T_TEST(TYPE) + +void f () +{ + T(short) + T(int) + T(long) + T(long long) + + T_TEST(float) + T_TEST(double) + /* Avoid trouble with non-power-of-two sizes. */ +#if !defined(__i386__) && !defined(__x86_64__) && !defined(__m68k__) && !defined(__ia64__) + T_TEST(long double) +#endif +} |