rewrite and rename issue-28766

This commit is contained in:
Oneirical 2024-05-17 14:41:54 -04:00
parent ddba1dc97e
commit e9edced096
5 changed files with 13 additions and 6 deletions

View File

@ -103,7 +103,6 @@ run-make/issue-25581/Makefile
run-make/issue-26006/Makefile
run-make/issue-26092/Makefile
run-make/issue-28595/Makefile
run-make/issue-28766/Makefile
run-make/issue-30063/Makefile
run-make/issue-33329/Makefile
run-make/issue-35164/Makefile

View File

@ -0,0 +1,13 @@
// The crate "foo" tied to this test executes a very specific function,
// which involves boxing an instance of the struct Foo. However,
// this once caused a segmentation fault in cargo release builds due to an LLVM
// incorrect assertion.
// This test checks that this bug does not resurface.
// See https://github.com/rust-lang/rust/issues/28766
use run_make_support::{rustc, tmp_dir};
fn main() {
rustc().opt().input("foo.rs").run();
rustc().opt().library_search_path(tmp_dir()).input("main.rs").run();
}

View File

@ -1,5 +0,0 @@
include ../tools.mk
all:
$(RUSTC) -O foo.rs
$(RUSTC) -O -L $(TMPDIR) main.rs