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
208 lines
6.1 KiB
Plaintext
208 lines
6.1 KiB
Plaintext
// RUN: cir-opt %s -verify-diagnostics -split-input-file
|
|
|
|
|
|
!u8i = !cir.int<u, 8>
|
|
!u64i = !cir.int<u, 64>
|
|
!rec_S = !cir.struct<"S" padded {!u8i}>
|
|
|
|
module {
|
|
cir.func dso_local @bad_static_array_ctor_with_num_elements(%p: !cir.ptr<!cir.array<!rec_S x 10>>, %n: !u64i) {
|
|
// expected-error@+1 {{'cir.array.ctor' op when 'num_elements' is present, 'addr' must be a pointer to a !cir.struct or !cir.union type}}
|
|
cir.array.ctor %p, %n : !cir.ptr<!cir.array<!rec_S x 10>>, !u64i {
|
|
^bb0(%e: !cir.ptr<!cir.array<!rec_S x 10>>):
|
|
}
|
|
cir.return
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
!u8i = !cir.int<u, 8>
|
|
!u64i = !cir.int<u, 64>
|
|
!rec_S = !cir.struct<"S" padded {!u8i}>
|
|
|
|
module {
|
|
cir.func private @_ZN1SC1Ev(!cir.ptr<!rec_S>)
|
|
|
|
// Static form: addr must be a pointer to an array type.
|
|
cir.func @bad_static_not_array_ctor(%p: !cir.ptr<!rec_S>) {
|
|
// expected-error@+1 {{'cir.array.ctor' op when 'num_elements' is absent, 'addr' must be a pointer to a !cir.array type}}
|
|
cir.array.ctor %p : !cir.ptr<!rec_S> {
|
|
^bb0(%e: !cir.ptr<!rec_S>):
|
|
cir.call @_ZN1SC1Ev(%e) : (!cir.ptr<!rec_S>) -> ()
|
|
}
|
|
cir.return
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
!u8i = !cir.int<u, 8>
|
|
!rec_S = !cir.struct<"S" padded {!u8i}>
|
|
|
|
module {
|
|
cir.func private @construct_int(!cir.ptr<!u8i>)
|
|
|
|
// Static form: addr must be a pointer to an array type.
|
|
cir.func @bad_static_array_not_record_ctor(%p: !cir.ptr<!cir.array<!u8i x 4>>) {
|
|
// expected-error@+1 {{'cir.array.ctor' op the block argument type must be a pointer to a !cir.struct or !cir.union type}}
|
|
cir.array.ctor %p : !cir.ptr<!cir.array<!u8i x 4>> {
|
|
^bb0(%e: !cir.ptr<!u8i>):
|
|
cir.call @construct_int(%e) : (!cir.ptr<!u8i>) -> ()
|
|
}
|
|
cir.return
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
!u8i = !cir.int<u, 8>
|
|
!u64i = !cir.int<u, 64>
|
|
!rec_S = !cir.struct<"S" padded {!u8i}>
|
|
!rec_T = !cir.struct<"T" padded {!u8i}>
|
|
|
|
module {
|
|
cir.func private @_ZN1SC1Ev(!cir.ptr<!rec_S>)
|
|
|
|
// Static form: block argument element type must match innermost array element.
|
|
cir.func @bad_static_element_mismatch_ctor(%p: !cir.ptr<!cir.array<!rec_S x 10>>) {
|
|
// expected-error@+1 {{'cir.array.ctor' op block argument pointee type must match the innermost array element type}}
|
|
cir.array.ctor %p : !cir.ptr<!cir.array<!rec_S x 10>> {
|
|
^bb0(%e: !cir.ptr<!rec_T>):
|
|
}
|
|
cir.return
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
!u8i = !cir.int<u, 8>
|
|
!u64i = !cir.int<u, 64>
|
|
!rec_S = !cir.struct<"S" padded {!u8i}>
|
|
!rec_T = !cir.struct<"T" padded {!u8i}>
|
|
|
|
module {
|
|
cir.func private @_ZN1SC1Ev(!cir.ptr<!rec_S>)
|
|
|
|
// Dynamic form: addr type must match block argument type.
|
|
cir.func @bad_dynamic_type_mismatch_ctor(%p: !cir.ptr<!rec_T>, %n: !u64i) {
|
|
// expected-error@+1 {{'cir.array.ctor' op when 'num_elements' is present, 'addr' type must match the block argument type}}
|
|
cir.array.ctor %p, %n : !cir.ptr<!rec_T>, !u64i {
|
|
^bb0(%e: !cir.ptr<!rec_S>):
|
|
cir.call @_ZN1SC1Ev(%e) : (!cir.ptr<!rec_S>) -> ()
|
|
}
|
|
cir.return
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
!u8i = !cir.int<u, 8>
|
|
!u64i = !cir.int<u, 64>
|
|
!rec_S = !cir.struct<"S" padded {!u8i}>
|
|
|
|
module {
|
|
cir.func dso_local @bad_static_array_dtor_with_num_elements(%p: !cir.ptr<!cir.array<!rec_S x 10>>, %n: !u64i) {
|
|
// expected-error@+1 {{'cir.array.dtor' op when 'num_elements' is present, 'addr' must be a pointer to a !cir.struct or !cir.union type}}
|
|
cir.array.dtor %p, %n : !cir.ptr<!cir.array<!rec_S x 10>>, !u64i {
|
|
^bb0(%e: !cir.ptr<!cir.array<!rec_S x 10>>):
|
|
}
|
|
cir.return
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
!u8i = !cir.int<u, 8>
|
|
!rec_S = !cir.struct<"S" padded {!u8i}>
|
|
|
|
module {
|
|
cir.func private @_ZN1SD1Ev(!cir.ptr<!rec_S>)
|
|
// Static form: addr must be a pointer to an array type.
|
|
cir.func @bad_static_not_array_dtor(%p: !cir.ptr<!rec_S>) {
|
|
// expected-error@+1 {{'cir.array.dtor' op when 'num_elements' is absent, 'addr' must be a pointer to a !cir.array type}}
|
|
cir.array.dtor %p : !cir.ptr<!rec_S> {
|
|
^bb0(%e: !cir.ptr<!rec_S>):
|
|
}
|
|
cir.return
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
!u8i = !cir.int<u, 8>
|
|
!rec_S = !cir.struct<"S" padded {!u8i}>
|
|
|
|
module {
|
|
cir.func private @destroy_int(!cir.ptr<!u8i>)
|
|
|
|
// Static form: addr must be a pointer to an array type.
|
|
cir.func @bad_static_array_not_record_dtor(%p: !cir.ptr<!cir.array<!u8i x 4>>) {
|
|
// expected-error@+1 {{'cir.array.dtor' op the block argument type must be a pointer to a !cir.struct or !cir.union type}}
|
|
cir.array.dtor %p : !cir.ptr<!cir.array<!u8i x 4>> {
|
|
^bb0(%e: !cir.ptr<!u8i>):
|
|
cir.call @destroy_int(%e) : (!cir.ptr<!u8i>) -> ()
|
|
}
|
|
cir.return
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
!u8i = !cir.int<u, 8>
|
|
!rec_S = !cir.struct<"S" padded {!u8i}>
|
|
!rec_T = !cir.struct<"T" padded {!u8i}>
|
|
|
|
module {
|
|
cir.func private @_ZN1SD1Ev(!cir.ptr<!rec_S>)
|
|
// Static form: addr must be a pointer to an array type.
|
|
cir.func @bad_static_dtor_not_array_ctor(%p: !cir.ptr<!cir.array<!rec_S x 10>>) {
|
|
// expected-error@+1 {{'cir.array.dtor' op block argument pointee type must match the innermost array element type}}
|
|
cir.array.dtor %p: !cir.ptr<!cir.array<!rec_S x 10>> {
|
|
^bb0(%e: !cir.ptr<!rec_T>):
|
|
}
|
|
cir.return
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
!u8i = !cir.int<u, 8>
|
|
!u64i = !cir.int<u, 64>
|
|
!rec_S = !cir.struct<"S" padded {!u8i}>
|
|
!rec_T = !cir.struct<"T" padded {!u8i}>
|
|
|
|
module {
|
|
cir.func private @_ZN1SD1Ev(!cir.ptr<!rec_S>)
|
|
|
|
// Static form: block argument element type must match innermost array element.
|
|
cir.func @bad_static_element_mismatch_dtor(%p: !cir.ptr<!cir.array<!rec_S x 10>>) {
|
|
// expected-error@+1 {{'cir.array.dtor' op block argument pointee type must match the innermost array element type}}
|
|
cir.array.dtor %p : !cir.ptr<!cir.array<!rec_S x 10>> {
|
|
^bb0(%e: !cir.ptr<!rec_T>):
|
|
}
|
|
cir.return
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
!u8i = !cir.int<u, 8>
|
|
!u64i = !cir.int<u, 64>
|
|
!rec_S = !cir.struct<"S" padded {!u8i}>
|
|
!rec_T = !cir.struct<"T" padded {!u8i}>
|
|
|
|
module {
|
|
cir.func private @_ZN1SD1Ev(!cir.ptr<!rec_S>)
|
|
|
|
// Dynamic form: addr type must match block argument type.
|
|
cir.func @bad_dynamic_type_mismatch_dtor(%p: !cir.ptr<!rec_T>, %n: !u64i) {
|
|
// expected-error@+1 {{'cir.array.dtor' op when 'num_elements' is present, 'addr' type must match the block argument type}}
|
|
cir.array.dtor %p, %n : !cir.ptr<!rec_T>, !u64i {
|
|
^bb0(%e: !cir.ptr<!rec_S>):
|
|
cir.call @_ZN1SD1Ev(%e) : (!cir.ptr<!rec_S>) -> ()
|
|
}
|
|
cir.return
|
|
}
|
|
}
|