diff options
| author | Mingming Liu <mingmingl@google.com> | 2025-09-10 15:25:31 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-10 15:25:31 -0700 |
| commit | 1417dafa1db9cb1b2b09438aa9f53ea5ab6e36e2 (patch) | |
| tree | 57f4b1f313c8cf74eed8819870f39c36ea263c68 /clang/test/Sema/constexpr.c | |
| parent | 898b813bc8a6d0276bf0f4769f5f2f64b34e632d (diff) | |
| parent | b8cefcb601ddaa18482555c4ff363c01a270c2fe (diff) | |
Merge branch 'main' into users/mingmingl-llvm/samplefdo-profile-formatusers/mingmingl-llvm/samplefdo-profile-format
Diffstat (limited to 'clang/test/Sema/constexpr.c')
| -rw-r--r-- | clang/test/Sema/constexpr.c | 10 |
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); |
