Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

109 lines
2.0 KiB
C++

// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s
extern int printf(const char*, ...);
// CHECK-LABEL: @_Z4testi(
int test(int val){
switch (val) {
case 4:
do {
switch (6) {
// CHECK: call noundef i32 (ptr, ...) @_Z6printfPKcz
case 6: do { case 5: printf("bad\n"); } while (0);
};
} while (0);
}
return 0;
}
int main(void) {
return test(5);
}
// CHECK-LABEL: @_Z10other_testv(
void other_test() {
switch(0) {
case 0:
do {
default:;
} while(0);
}
}
struct X { X(); ~X(); };
void dont_call();
void foo();
// CHECK-LABEL: @_Z13nested_scopesv(
void nested_scopes() {
switch (1) {
case 0:
// CHECK-NOT: @_Z9dont_callv(
dont_call();
break;
default:
// CHECK: call {{.*}} @_ZN1XC1Ev(
// CHECK: call {{.*}} @_Z3foov(
// CHECK-NOT: call {{.*}} @_Z3foov(
// CHECK: call {{.*}} @_ZN1XD1Ev(
{ X x; foo(); }
// CHECK: call {{.*}} @_ZN1XC1Ev(
// CHECK: call {{.*}} @_Z3foov(
// CHECK: call {{.*}} @_ZN1XD1Ev(
{ X x; foo(); }
// CHECK: call {{.*}} @_ZN1XC1Ev(
// CHECK: call {{.*}} @_Z3foov(
// CHECK: call {{.*}} @_ZN1XD1Ev(
{ X x; foo(); }
break;
}
}
// CHECK-LABEL: @_Z17scope_fallthroughv(
void scope_fallthrough() {
switch (1) {
// CHECK: call {{.*}} @_ZN1XC1Ev(
// CHECK-NOT: call {{.*}} @_Z3foov(
// CHECK: call {{.*}} @_ZN1XD1Ev(
{ default: X x; }
// CHECK: call {{.*}} @_Z3foov(
foo();
break;
}
}
// CHECK-LABEL: @_Z12hidden_breakb(
void hidden_break(bool b) {
switch (1) {
default:
// CHECK: br
if (b)
break;
// CHECK: call {{.*}} @_Z3foov(
foo();
break;
}
}
// CHECK-LABEL: @_Z10hidden_varv(
int hidden_var() {
switch (1) {
// CHECK: %[[N:.*]] = alloca i32
case 0: int n;
// CHECK: store i32 0, ptr %[[N]]
// CHECK: load i32, ptr %[[N]]
// CHECK: ret
default: n = 0; return n;
}
}
// CHECK-LABEL: @_Z13case_in_labelv(
void case_in_label() {
// CHECK: br label %
switch (1) case 1: foo: case 0: goto foo;
}