summaryrefslogtreecommitdiff
path: root/clang/test/Sema/constexpr.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/constexpr.c')
-rw-r--r--clang/test/Sema/constexpr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Sema/constexpr.c b/clang/test/Sema/constexpr.c
index 3dcb0b3a7d95..e9b738ab4d19 100644
--- a/clang/test/Sema/constexpr.c
+++ b/clang/test/Sema/constexpr.c
@@ -391,3 +391,13 @@ void ghissue109095() {
_Static_assert(i == c[0]); // expected-error {{static assertion expression is not an integral constant expression}}\
// expected-note {{initializer of 'i' is not a constant expression}}
}
+
+typedef bool __vbool2 __attribute__((ext_vector_type(2)));
+typedef short v2int16_t __attribute__((ext_vector_type(2)));
+
+bool issue155507(v2int16_t a, v2int16_t b) {
+ return __builtin_bit_cast(unsigned char, __builtin_convertvector(a == b, __vbool2)) == 0b11;
+}
+
+constexpr bool b2 = (bool)nullptr;
+_Static_assert(!b2);