You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ICE on aarch64 SVE scalable-vector tuple types (svint32x4_t): field/offset count mismatch in codegen_struct_fields #4963
On aarch64, Kani crashes generating code for SVE intrinsics in core that use the #[rustc_scalable_vector]tuple types, such as svint32x4_t:
error: internal compiler error: Kani unexpectedly panicked at kani-compiler/src/codegen_cprover_gotoc/codegen/typ.rs:777:17:
assertion `left == right` failed
left: 4
right: 1
[Kani] current codegen item: declare_function: core::core_arch::aarch64::sve::generated::svld4_s32
[Kani] current codegen location: stdarch/crates/core_arch/src/aarch64/sve/generated.rs, line 16763
typ.rs:777 is assert_eq!(flds.len(), offsets.len()) in codegen_struct_fields. svint32x4_t is a four-field tuple struct, but its FieldsShape::Arbitrary layout carries only one offset:
model-checking/verify-rust-std#687 (library at nightly-2026-09-25), job Kani Metrics (macos-latest), which runs kani autoharness -Z autoharness --list --std ./library on the Apple Silicon runner. Kani main at 1640445d. core fails to compile, so the job fails. x86_64 is unaffected because the SVE module is only compiled for aarch64. SVE support is new in core since nightly-2026-08-21.
Reproducer
I could only observe this on CI, since I have no aarch64 machine. A reproducer that should hit the same path, untested:
The type alone is probably enough: the crash happens in declare_function, while lowering the signature.
Suggested handling
Scalable vectors have no fixed size, so they can't be modelled exactly. But the crash would become a graceful unsupported-construct report if #[rustc_scalable_vector] types (scalar and tuple) were recognised before codegen_struct_fields asserts on their layout. That alone would unblock autoharness over core on aarch64.
Activity
Fix codegen crashes on SVE tuples and non-power-of-two `Simd` on aarc…