File tree 5 files changed +27
-15
lines changed
5 files changed +27
-15
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,12 @@ impl Rustc {
64
64
self
65
65
}
66
66
67
+ /// Specify a specific optimization level.
68
+ pub fn opt_level ( & mut self , option : & str ) -> & mut Self {
69
+ self . cmd . arg ( format ! ( "-Copt-level={option}" ) ) ;
70
+ self
71
+ }
72
+
67
73
/// Specify type(s) of output files to generate.
68
74
pub fn emit ( & mut self , kinds : & str ) -> & mut Self {
69
75
self . cmd . arg ( format ! ( "--emit={kinds}" ) ) ;
Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ run-make/issue-37839/Makefile
112
112
run-make/issue-37893/Makefile
113
113
run-make/issue-38237/Makefile
114
114
run-make/issue-40535/Makefile
115
- run-make/issue-46239/Makefile
116
115
run-make/issue-47384/Makefile
117
116
run-make/issue-47551/Makefile
118
117
run-make/issue-51671/Makefile
Original file line number Diff line number Diff line change
1
+ //@ compile-flags: -Copt-level=1
2
+
3
+ // References returned by a Frozen pointer type
4
+ // could be marked as "noalias", which caused miscompilation errors.
5
+ // This test runs the most minimal possible code that can reproduce this bug,
6
+ // and checks that noalias does not appear.
7
+ // See https://github.com/rust-lang/rust/issues/46239
8
+
9
+ #![ crate_type = "lib" ]
10
+
11
+ fn project < T > ( x : & ( T , ) ) -> & T { & x. 0 }
12
+
13
+ fn dummy ( ) { }
14
+
15
+ // CHECK-LABEL: @foo(
16
+ // CHECK-NOT: noalias
17
+ #[ no_mangle]
18
+ pub fn foo ( ) {
19
+ let f = ( dummy as fn ( ) , ) ;
20
+ ( * project ( & f) ) ( ) ;
21
+ }
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments