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
55 lines
1.3 KiB
C
55 lines
1.3 KiB
C
// RUN: %clang_cc1 -fsyntax-only -verify -std=c23 %s
|
|
|
|
// GH87641 noticed that integer promotion of a bit-field of bit-precise integer
|
|
// type was promoting to int rather than the type of the bit-field.
|
|
struct S {
|
|
unsigned _BitInt(7) x : 2;
|
|
unsigned _BitInt(2) y : 2;
|
|
unsigned _BitInt(72) z : 28;
|
|
_BitInt(31) a : 12;
|
|
_BitInt(33) b : 33;
|
|
};
|
|
|
|
// We don't have to worry about promotion cases where the bit-precise type is
|
|
// smaller than the width of the bit-field; that can't happen.
|
|
struct T {
|
|
unsigned _BitInt(28) oh_no : 72; // expected-error {{width of bit-field 'oh_no' (72 bits) exceeds the width of its type (28 bits)}}
|
|
};
|
|
|
|
static_assert(
|
|
_Generic(+(struct S){}.x,
|
|
int : 0,
|
|
unsigned _BitInt(7) : 1,
|
|
unsigned _BitInt(2) : 2
|
|
) == 1);
|
|
|
|
static_assert(
|
|
_Generic(+(struct S){}.y,
|
|
int : 0,
|
|
unsigned _BitInt(7) : 1,
|
|
unsigned _BitInt(2) : 2
|
|
) == 2);
|
|
|
|
static_assert(
|
|
_Generic(+(struct S){}.z,
|
|
int : 0,
|
|
unsigned _BitInt(72) : 1,
|
|
unsigned _BitInt(28) : 2
|
|
) == 1);
|
|
|
|
static_assert(
|
|
_Generic(+(struct S){}.a,
|
|
int : 0,
|
|
_BitInt(31) : 1,
|
|
_BitInt(12) : 2,
|
|
unsigned _BitInt(31) : 3
|
|
) == 1);
|
|
|
|
static_assert(
|
|
_Generic(+(struct S){}.b,
|
|
int : 0,
|
|
long long : 1,
|
|
_BitInt(33) : 2,
|
|
unsigned _BitInt(33) : 3
|
|
) == 2);
|