CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
81 lines
1.9 KiB
C
81 lines
1.9 KiB
C
// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-C %s
|
||
// RUN: %clang_cc1 -x c++ -std=c++11 -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-CPP0X %s
|
||
|
||
#include <stddef.h>
|
||
|
||
int main(void) {
|
||
// CHECK-C: store i8 97
|
||
// CHECK-CPP0X: store i8 97
|
||
char a = 'a';
|
||
|
||
// Should truncate value (equal to last character).
|
||
// CHECK-C: store i8 98
|
||
// CHECK-CPP0X: store i8 98
|
||
char b = 'ab';
|
||
|
||
// Should get concatenated characters
|
||
// CHECK-C: store i32 24930
|
||
// CHECK-CPP0X: store i32 24930
|
||
int b1 = 'ab';
|
||
|
||
// Should get concatenated characters
|
||
// CHECK-C: store i32 808464432
|
||
// CHECK-CPP0X: store i32 808464432
|
||
int b2 = '0000';
|
||
|
||
// Should get truncated value (last four characters concatenated)
|
||
// CHECK-C: store i32 1919512167
|
||
// CHECK-CPP0X: store i32 1919512167
|
||
int b3 = 'somesillylongstring';
|
||
|
||
// CHECK-C: store i32 97
|
||
// CHECK-CPP0X: store i32 97
|
||
wchar_t wa = L'a';
|
||
|
||
#if __cplusplus >= 201103L
|
||
// CHECK-CPP0X: store i16 97
|
||
char16_t ua = u'a';
|
||
|
||
// CHECK-CPP0X: store i32 97
|
||
char32_t Ua = U'a';
|
||
|
||
// CHECK-CPP0X: store i16 1047
|
||
char16_t ua1 = u'З';
|
||
// CHECK-CPP0X: store i16 12538
|
||
char16_t ua2 = u'ヺ';
|
||
// CHECK-CPP0X: store i16 -27177
|
||
char16_t ua3 = u'闗';
|
||
|
||
// CHECK-CPP0X: store i32 181
|
||
char32_t Ua1 = U'µ';
|
||
// CHECK-CPP0X: store i32 38359
|
||
char32_t Ua2 = U'闗';
|
||
// CHECK-CPP0X: store i32 128128
|
||
char32_t Ua3 = U'💀';
|
||
|
||
#endif
|
||
|
||
// CHECK-C: store i32 61451
|
||
// CHECK-CPP0X: store i32 61451
|
||
wchar_t wc = L'\uF00B';
|
||
|
||
#if __cplusplus >= 201103L
|
||
// -4085 == 0xf00b
|
||
// CHECK-CPP0X: store i16 -4085
|
||
char16_t uc = u'\uF00B';
|
||
|
||
// CHECK-CPP0X: store i32 61451
|
||
char32_t Uc = U'\uF00B';
|
||
#endif
|
||
|
||
// CHECK-C: store i32 1110027
|
||
// CHECK-CPP0X: store i32 1110027
|
||
wchar_t wd = L'\U0010F00B';
|
||
|
||
#if __cplusplus >= 201103L
|
||
// CHECK-CPP0X: store i32 1110027
|
||
char32_t Ud = U'\U0010F00B';
|
||
#endif
|
||
|
||
}
|