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
203 lines
3.6 KiB
Plaintext
203 lines
3.6 KiB
Plaintext
// RUN: cir-opt %s -verify-diagnostics -split-input-file
|
|
|
|
module {
|
|
|
|
cir.func dso_local @invalid_catch_without_all_or_type() {
|
|
cir.scope {
|
|
cir.try {
|
|
cir.yield
|
|
// expected-error @below {{'cir.try' expected 'all' or 'type' keyword}}
|
|
} catch [invalid_keyword {
|
|
cir.yield
|
|
}
|
|
}
|
|
cir.return
|
|
}
|
|
|
|
}
|
|
|
|
// -----
|
|
|
|
module {
|
|
|
|
cir.func dso_local @invalid_catch_rtti_type() {
|
|
cir.scope {
|
|
// expected-error @below {{'cir.try' op attribute 'handler_types' failed to satisfy constraint: catch all or unwind or global view array attribute}}
|
|
cir.try {
|
|
cir.yield
|
|
} catch [type #cir.undef] (%eh_token : !cir.eh_token) {
|
|
cir.yield
|
|
}
|
|
}
|
|
cir.return
|
|
}
|
|
|
|
}
|
|
|
|
// -----
|
|
|
|
module {
|
|
|
|
cir.func dso_local @invalid_catch_empty_block() {
|
|
cir.scope {
|
|
cir.try {
|
|
cir.yield
|
|
}
|
|
// expected-error @below {{'cir.try' blocks are expected to be explicitly terminated}}
|
|
catch all (%eh_token : !cir.eh_token) {
|
|
}
|
|
}
|
|
cir.return
|
|
}
|
|
|
|
}
|
|
|
|
// -----
|
|
|
|
!s32i = !cir.int<s, 32>
|
|
|
|
module {
|
|
|
|
cir.func dso_local @invalid_catch_not_terminated() {
|
|
%a = cir.alloca !s32i, !cir.ptr<!s32i>, ["a", init] {alignment = 4 : i64}
|
|
cir.scope {
|
|
cir.try {
|
|
cir.yield
|
|
}
|
|
// expected-error @below {{'cir.try' blocks are expected to be explicitly terminated}}
|
|
catch all (%eh_token : !cir.eh_token) {
|
|
%tmp_a = cir.load %a : !cir.ptr<!s32i>, !s32i
|
|
}
|
|
}
|
|
cir.return
|
|
}
|
|
|
|
}
|
|
|
|
// -----
|
|
|
|
module {
|
|
|
|
cir.func dso_local @invalid_catch_multiple_catch_all() {
|
|
cir.scope {
|
|
cir.try {
|
|
cir.yield
|
|
} catch all (%eh_token : !cir.eh_token) {
|
|
cir.yield
|
|
}
|
|
// expected-error @below {{op 'cir.try' can't have more than one catch all}}
|
|
catch all (%eh_token_1 : !cir.eh_token) {
|
|
cir.yield
|
|
}
|
|
}
|
|
cir.return
|
|
}
|
|
|
|
}
|
|
|
|
// -----
|
|
|
|
module {
|
|
|
|
cir.func dso_local @invalid_catch_without_type_info() {
|
|
cir.scope {
|
|
cir.try {
|
|
cir.yield
|
|
}
|
|
// expected-error @below {{expected attribute value}}
|
|
// expected-error @below {{op 'cir.try' expected valid RTTI info attribute}}
|
|
catch [type] (%eh_token : !cir.eh_token) {
|
|
cir.yield
|
|
}
|
|
}
|
|
cir.return
|
|
}
|
|
|
|
}
|
|
|
|
// -----
|
|
|
|
module {
|
|
|
|
cir.func dso_local @invalid_catch_all_with_type_info() {
|
|
cir.scope {
|
|
cir.try {
|
|
cir.yield
|
|
}
|
|
// expected-error @below {{op 'cir.try' catch all dosen't need RTTI info attribute}}
|
|
catch [all] (%eh_token : !cir.eh_token) {
|
|
cir.yield
|
|
}
|
|
}
|
|
cir.return
|
|
}
|
|
|
|
}
|
|
|
|
// -----
|
|
|
|
!u8i = !cir.int<u, 8>
|
|
!void = !cir.void
|
|
|
|
module {
|
|
|
|
cir.global "private" constant external @_ZTIi : !cir.ptr<!u8i>
|
|
|
|
cir.func dso_local @catch_handler_missing_begin_catch() {
|
|
cir.scope {
|
|
// expected-error @below {{catch handler region must start with 'cir.begin_catch'}}
|
|
cir.try {
|
|
cir.yield
|
|
} catch [type #cir.global_view<@_ZTIi> : !cir.ptr<!u8i>] (%eh_token : !cir.eh_token) {
|
|
cir.yield
|
|
} unwind (%eh_token_1 : !cir.eh_token) {
|
|
cir.resume %eh_token_1 : !cir.eh_token
|
|
}
|
|
}
|
|
cir.return
|
|
}
|
|
|
|
}
|
|
|
|
// -----
|
|
|
|
!void = !cir.void
|
|
|
|
module {
|
|
|
|
cir.func dso_local @catch_all_handler_missing_begin_catch() {
|
|
cir.scope {
|
|
// expected-error @below {{catch handler region must start with 'cir.begin_catch'}}
|
|
cir.try {
|
|
cir.yield
|
|
} catch all (%eh_token : !cir.eh_token) {
|
|
cir.yield
|
|
}
|
|
}
|
|
cir.return
|
|
}
|
|
|
|
}
|
|
|
|
// -----
|
|
|
|
module {
|
|
|
|
cir.func dso_local @invalid_unwind_with_catch_all() {
|
|
cir.scope {
|
|
cir.try {
|
|
cir.yield
|
|
}
|
|
catch all (%eh_token : !cir.eh_token) {
|
|
cir.yield
|
|
}
|
|
// expected-error @below {{op 'cir.try' unwind can't be used with catch all}}
|
|
unwind (%eh_token_1 : !cir.eh_token) {
|
|
|
|
}
|
|
}
|
|
cir.return
|
|
}
|
|
|
|
}
|