forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add fixme tests for issue rust-lang#2121 (rust-lang#2122)
Add fixme tests for rust-lang#2121 to the expected suite since the test should fail, but not crash.
- Loading branch information
Showing
5 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Kani unexpectedly panicked during compilation. |
14 changes: 14 additions & 0 deletions
14
tests/expected/intrinsics/ctpop_ice_fixme/fixme_ctpop_ice.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright Kani Contributors | ||
// SPDX-License-Identifier: Apache-2.0 OR MIT | ||
//! Check that we correctly handle type mistmatch when the argument is a ZST type. | ||
//! The compiler crashes today: https://github.com/model-checking/kani/issues/2121 | ||
#![feature(core_intrinsics)] | ||
use std::intrinsics::ctpop; | ||
|
||
// These shouldn't compile. | ||
#[kani::proof] | ||
pub fn check_zst_ctpop() { | ||
let n = ctpop(()); | ||
assert!(n == ()); | ||
} |
13 changes: 13 additions & 0 deletions
13
tests/expected/intrinsics/sub_with_workflow_ice_fixme/arithmetic_zst_fixme.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright Kani Contributors | ||
// SPDX-License-Identifier: Apache-2.0 OR MIT | ||
//! Check that arithmetic operations with overflow compilation fails. | ||
//! The compiler crashes today: https://github.com/model-checking/kani/issues/2121 | ||
#![feature(core_intrinsics)] | ||
use std::intrinsics::sub_with_overflow; | ||
|
||
#[kani::proof] | ||
pub fn check_zst_sub_with_overflow() { | ||
let n = sub_with_overflow((), ()); | ||
assert!(!n.1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Kani unexpectedly panicked during compilation. |