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

Migrate run-make/issue-46239 to rmake #125222

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
21 changes: 21 additions & 0 deletions tests/codegen/noalias-freeze.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//@ compile-flags: -Copt-level=1

// References returned by a Frozen pointer type
// could be marked as "noalias", which caused miscompilation errors.
// This test runs the most minimal possible code that can reproduce this bug,
// and checks that noalias does not appear.
// See https://github.com/rust-lang/rust/issues/46239

#![crate_type = "lib"]

fn project<T>(x: &(T,)) -> &T { &x.0 }

fn dummy() {}

// CHECK-LABEL: @foo(
// CHECK-NOT: noalias
#[no_mangle]
pub fn foo() {
let f = (dummy as fn(),);
(*project(&f))();
}
6 changes: 0 additions & 6 deletions tests/run-make/issue-46239/Makefile

This file was deleted.

8 changes: 0 additions & 8 deletions tests/run-make/issue-46239/main.rs

This file was deleted.

Loading