Skip to content

Commit a0d7d80

Browse files
Toolchain upgrade to nightly-2025-05-04 (#4059)
This PR upgrade Rust toolchain to nightly-2025-05-04. Thanks to @remi-delmas-3000 the suggestion, we can enable target-features. For this PR, I enabled sse and neon. Resolves #3059 #3878 #4044 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
1 parent a15883b commit a0d7d80

File tree

11 files changed

+29
-9
lines changed

11 files changed

+29
-9
lines changed

kani-compiler/src/codegen_cprover_gotoc/codegen/statement.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ impl GotocCtx<'_> {
283283
| AssertMessage::DivisionByZero { .. }
284284
| AssertMessage::RemainderByZero { .. }
285285
| AssertMessage::ResumedAfterReturn { .. }
286+
| AssertMessage::ResumedAfterDrop { .. }
286287
| AssertMessage::ResumedAfterPanic { .. } => {
287288
(msg.description().unwrap(), PropertyClass::Assertion)
288289
}

kani-compiler/src/codegen_cprover_gotoc/compiler_interface.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use rustc_codegen_ssa::back::archive::{
2929
};
3030
use rustc_codegen_ssa::back::link::link_binary;
3131
use rustc_codegen_ssa::traits::CodegenBackend;
32-
use rustc_codegen_ssa::{CodegenResults, CrateInfo};
32+
use rustc_codegen_ssa::{CodegenResults, CrateInfo, TargetConfig};
3333
use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
3434
use rustc_errors::DEFAULT_LOCALE_RESOURCE;
3535
use rustc_hir::def_id::{DefId as InternalDefId, LOCAL_CRATE};
@@ -41,6 +41,7 @@ use rustc_session::Session;
4141
use rustc_session::config::{CrateType, OutputFilenames, OutputType};
4242
use rustc_session::output::out_filename;
4343
use rustc_smir::rustc_internal;
44+
use rustc_span::symbol::Symbol;
4445
use rustc_target::spec::PanicStrategy;
4546
use stable_mir::CrateDef;
4647
use stable_mir::mir::mono::{Instance, MonoItem};
@@ -249,6 +250,19 @@ impl CodegenBackend for GotocCodegenBackend {
249250
DEFAULT_LOCALE_RESOURCE
250251
}
251252

253+
fn target_config(&self, _sess: &Session) -> TargetConfig {
254+
TargetConfig {
255+
target_features: vec![],
256+
unstable_target_features: vec![Symbol::intern("sse"), Symbol::intern("neon")],
257+
// `true` is used as a default so backends need to acknowledge when they do not
258+
// support the float types, rather than accidentally quietly skipping all tests.
259+
has_reliable_f16: true,
260+
has_reliable_f16_math: true,
261+
has_reliable_f128: true,
262+
has_reliable_f128_math: true,
263+
}
264+
}
265+
252266
fn codegen_crate(
253267
&self,
254268
tcx: TyCtxt,

kani-compiler/src/kani_middle/transform/internal_mir.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,9 @@ impl RustcInternalMir for AssertMessage {
549549
AssertMessage::NullPointerDereference => {
550550
rustc_middle::mir::AssertMessage::NullPointerDereference
551551
}
552+
AssertMessage::ResumedAfterDrop(coroutine_kind) => {
553+
rustc_middle::mir::AssertMessage::ResumedAfterDrop(coroutine_kind.internal_mir(tcx))
554+
}
552555
}
553556
}
554557
}
@@ -579,6 +582,8 @@ impl RustcInternalMir for TerminatorKind {
579582
target: rustc_middle::mir::BasicBlock::from_usize(*target),
580583
unwind: unwind.internal_mir(tcx),
581584
replace: false,
585+
drop: None,
586+
async_fut: None,
582587
}
583588
}
584589
TerminatorKind::Call { func, args, destination, target, unwind } => {

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0 OR MIT
33

44
[toolchain]
5-
channel = "nightly-2025-04-24"
5+
channel = "nightly-2025-05-04"
66
components = ["llvm-tools", "rustc-dev", "rust-src", "rustfmt"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
assertion\
22
- Status: SUCCESS\
3-
- Description: "|result| old({ let x = &ptr; let y = **x; y + 1 }) == *ptr"\
3+
- Description: "|result| old({let x = &ptr; let y = **x; y + 1}) == *ptr"\
44

55
VERIFICATION:- SUCCESSFUL
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Failed Checks: |result| old({ *ptr+=1; *ptr }) == _val
1+
Failed Checks: |result| old({*ptr+=1; *ptr}) == _val
22
VERIFICATION:- FAILED
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
assertion\
22
- Status: SUCCESS\
3-
- Description: "|_| unsafe{ *im.x.get() } < 101"\
3+
- Description: "|_| unsafe{*im.x.get()} < 101"\
44
in function modify
55

66
VERIFICATION:- SUCCESSFUL
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
assertion\
22
- Status: SUCCESS\
3-
- Description: "|_| unsafe{ *im.x.as_ptr() } < 101"\
3+
- Description: "|_| unsafe{*im.x.as_ptr()} < 101"\
44
in function modify
55

66
VERIFICATION:- SUCCESSFUL
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
assertion\
22
- Status: SUCCESS\
3-
- Description: "|_| unsafe{ *im.x.get() } < 101"\
3+
- Description: "|_| unsafe{*im.x.get()} < 101"\
44
in function modify
55

66
VERIFICATION:- SUCCESSFUL
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
check_misaligned_ptr_cast_fail.safety_check\
22
Status: FAILURE\
3-
Description: "misaligned pointer to reference cast: address must be a multiple of its type's alignment"\
3+
Description: "misaligned pointer dereference: address must be a multiple of its type's alignment"\
44
in function check_misaligned_ptr_cast_fail

0 commit comments

Comments
 (0)