Skip to content

Commit

Permalink
rewrite and rename issue-20626 to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jun 25, 2024
1 parent fe2406b commit ee529b7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ run-make/issue-109934-lto-debuginfo/Makefile
run-make/issue-14698/Makefile
run-make/issue-15460/Makefile
run-make/issue-18943/Makefile
run-make/issue-20626/Makefile
run-make/issue-22131/Makefile
run-make/issue-25581/Makefile
run-make/issue-26006/Makefile
Expand Down
9 changes: 0 additions & 9 deletions tests/run-make/issue-20626/Makefile

This file was deleted.

File renamed without changes.
16 changes: 16 additions & 0 deletions tests/run-make/raw-fn-pointer-opt-undefined-behavior/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Despite the absence of any unsafe Rust code, foo.rs in this test would,
// because of the raw function pointer,
// cause undefined behavior and fail to print the expected result, "4" -
// only when activating optimizations (opt-level 2). This test checks
// that this bug does not make a resurgence.
// Note that the bug cannot be observed in an assert_eq!, only in the stdout.
// See https://github.com/rust-lang/rust/issues/20626

//@ ignore-cross-compile

use run_make_support::{run, rustc};

fn main() {
rustc().input("foo.rs").opt().run();
run("foo").assert_stdout_equals("4");
}

0 comments on commit ee529b7

Please sign in to comment.