rewrite and rename issue-25581

This commit is contained in:
Oneirical 2024-07-08 13:54:04 -04:00
parent a47ca19134
commit a795d8998d
5 changed files with 17 additions and 7 deletions

View File

@ -44,7 +44,6 @@ run-make/issue-107094/Makefile
run-make/issue-14698/Makefile run-make/issue-14698/Makefile
run-make/issue-15460/Makefile run-make/issue-15460/Makefile
run-make/issue-22131/Makefile run-make/issue-22131/Makefile
run-make/issue-25581/Makefile
run-make/issue-26006/Makefile run-make/issue-26006/Makefile
run-make/issue-28595/Makefile run-make/issue-28595/Makefile
run-make/issue-33329/Makefile run-make/issue-33329/Makefile

View File

@ -0,0 +1,17 @@
// Slices were broken when implicated in foreign-function interface (FFI) with
// a C library, with something as simple as measuring the length or returning
// an item at a certain index of a slice would cause an internal compiler error (ICE).
// This was fixed in #25653, and this test checks that slices in Rust-C FFI can be part
// of a program that compiles and executes successfully.
// See https://github.com/rust-lang/rust/issues/25581
//@ ignore-cross-compile
// Reason: the compiled binary is executed
use run_make_support::{build_native_static_lib, run, rustc};
fn main() {
build_native_static_lib("test");
rustc().input("test.rs").run();
run("test");
}

View File

@ -1,6 +0,0 @@
# ignore-cross-compile
include ../tools.mk
all: $(call NATIVE_STATICLIB,test)
$(RUSTC) test.rs
$(call RUN,test) || exit 1