Skip to content

Commit

Permalink
rewrite and rename issue-46239
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed May 17, 2024
1 parent ddba1dc commit 46091b0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
6 changes: 6 additions & 0 deletions src/tools/run-make-support/src/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ impl Rustc {
self
}

/// Specify a specific optimization level.
pub fn opt_level(&mut self, option: &str) -> &mut Self {
self.cmd.arg(format!("-Copt-level={option}"));
self
}

/// Specify type(s) of output files to generate.
pub fn emit(&mut self, kinds: &str) -> &mut Self {
self.cmd.arg(format!("--emit={kinds}"));
Expand Down
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 @@ -112,7 +112,6 @@ run-make/issue-37839/Makefile
run-make/issue-37893/Makefile
run-make/issue-38237/Makefile
run-make/issue-40535/Makefile
run-make/issue-46239/Makefile
run-make/issue-47384/Makefile
run-make/issue-47551/Makefile
run-make/issue-51671/Makefile
Expand Down
6 changes: 0 additions & 6 deletions tests/run-make/issue-46239/Makefile

This file was deleted.

File renamed without changes.
14 changes: 14 additions & 0 deletions tests/run-make/no-mark-noalias/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// In the rustc_trans crate, references returned by a Frozen pointer type
// could mark them as "noalias", which caused miscompilation errors.
// This test runs the most minimal possible code that can reproduce this bug,
// and checks that compilation remains successful.
// See https://github.com/rust-lang/rust/issues/46239

//@ ignore-cross-compile

use run_make_support::{run, rustc};

fn main() {
rustc().input("main.rs").opt_level("1").run();
run("main");
}

0 comments on commit 46091b0

Please sign in to comment.