================
@@ -75,6 +75,18 @@ typedef int __attribute__((ext_vector_type(0x100000000)))
e2; // expected-e
typedef int __attribute__((vector_size((__int128_t)1 << 100))) e3; //
expected-error {{vector size too large}}
typedef int __attribute__((ext_vector_type(0))) e4; //
expected-error {{zero vector size}}
+typedef const int cint;
+typedef int __attribute__((vector_size(16))) vec4_int;
+typedef cint __attribute__((vector_size(16))) vec4_cint;
+_Static_assert(__builtin_types_compatible_p(vec4_int, const vec4_int),
"'vec4_int' and 'const vec4_int' are not compatible");
+_Static_assert(__builtin_types_compatible_p(vec4_int, volatile vec4_int),
"'vec4_int' and 'const vec4_int' are not compatible");
+_Static_assert(__builtin_types_compatible_p(const vec4_int, vec4_cint),
"'const vec4_int' and 'vec4_cint' are not compatible");
+typedef int __attribute__((ext_vector_type(4))) ext_vec4_int;
+typedef cint __attribute__((ext_vector_type(4))) ext_vec4_cint;
+_Static_assert(__builtin_types_compatible_p(ext_vec4_int, const ext_vec4_int),
"'ext_vec4_int' and 'const ext_vec4_int' are not compatible");
+_Static_assert(__builtin_types_compatible_p(ext_vec4_int, volatile
ext_vec4_int), "'ext_vec4_int' and 'const ext_vec4_int' are not compatible");
+_Static_assert(__builtin_types_compatible_p(const ext_vec4_int,
ext_vec4_cint), "'const ext_vec4_int' and 'ext_vec4_cint' are not compatible'");
----------------
michele-scandale wrote:
Makes sense. I've updated the test and rebased the PR
https://github.com/llvm/llvm-project/pull/197624
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits