Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 5 pull requests #132399

Closed
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
167350d
Add `lp64e` RISC-V ABI
koute Oct 30, 2024
4d8bda3
Add a regression test for #132353
jieyouxu Oct 30, 2024
10b8ba4
Mark `simplify_aggregate_to_copy` mir-opt as unsound
jieyouxu Oct 30, 2024
cfb4c05
Add a mir-opt GVN test for #128299
jieyouxu Oct 30, 2024
44b720a
Add a comment about `lp64e` still being unstable
koute Oct 31, 2024
c1db011
Add `lp64e` ABI to the spec tests match
koute Oct 31, 2024
183599f
CI: use free runners for 3 fast windows jobs
marcoieni Oct 31, 2024
82c2e42
minicore: add minimal minicore test auxiliary
jieyouxu Sep 22, 2024
f9ca420
bootstrap: pass minicore path when running compiletest step
jieyouxu Sep 22, 2024
74c0c48
compiletest: localize `compile_test_and_save_assembly` to assembly te…
jieyouxu Oct 11, 2024
95d01fc
compiletest: register `--minicore-path` flag and `//@ add-core-stubs`…
jieyouxu Oct 22, 2024
a737f75
compiletest: conditionally build and provide `minicore` as extern pre…
jieyouxu Oct 22, 2024
59cb59d
compiletest: stamp `minicore.rs` to rerun tests on changes
jieyouxu Oct 22, 2024
b115a22
tests/assembly: add `minicore` compiletest self-test
jieyouxu Oct 11, 2024
a8b34f5
tests/codegen: add `minicore` compiletest self-test
jieyouxu Oct 11, 2024
0bbe07e
tests/ui: add `minicore` compiletest self-test
jieyouxu Oct 11, 2024
adb6d47
tests: use minicore in `tests/ui/abi/compatibility.rs` as an example
jieyouxu Sep 28, 2024
8dddd1a
coverage: Avoid ICE when `coverage_cx` is unexpectedly unavailable
Zalathar Oct 31, 2024
788db96
Rollup merge of #130693 - jieyouxu:minicore, r=bjorn3
matthiaskrgr Oct 31, 2024
5cc026d
Rollup merge of #132316 - MarcoIeni:ci-free-runners-windows, r=Mark-S…
matthiaskrgr Oct 31, 2024
6045588
Rollup merge of #132354 - koute:master, r=workingjubilee
matthiaskrgr Oct 31, 2024
6b5a40b
Rollup merge of #132356 - jieyouxu:unsound-simplify_aggregate_to_copy…
matthiaskrgr Oct 31, 2024
d01f8e2
Rollup merge of #132395 - Zalathar:coverage-cx-ice, r=jieyouxu
matthiaskrgr Oct 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a regression test for #132353
To catch at least one pattern that was miscompiled. The test is a
minimization of the MCVE reported in
<#132353>.
  • Loading branch information
jieyouxu committed Oct 31, 2024
commit 4d8bda335e23b7ff10ff0c645c825a90fc2646bb
25 changes: 25 additions & 0 deletions tests/ui/mir/clone-canonicalization-miscompile-132353.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//! The mir-opt added in <https://github.com/rust-lang/rust/pull/128299> unfortunately seems to lead
//! to a miscompile (reported in <https://github.com/rust-lang/rust/issues/132353>, minimization
//! reproduced in this test file).
//@ revisions: release debug
// Note: it's not strictly cargo's release profile, but any non-zero opt-level was sufficient to
// reproduce the miscompile.
//@[release] compile-flags: -C opt-level=1
//@[debug] compile-flags: -C opt-level=0
//@ run-pass

fn pop_min(mut score2head: Vec<Option<usize>>) -> Option<usize> {
loop {
if let Some(col) = score2head[0] {
score2head[0] = None;
return Some(col);
}
}
}

fn main() {
let min = pop_min(vec![Some(1)]);
println!("min: {:?}", min);
// panic happened on 1.83.0 beta in release mode but not debug mode.
let _ = min.unwrap();
}