Last active
August 29, 2015 14:13
-
-
Save Twinklebear/0b6efd45b420507901ac to your computer and use it in GitHub Desktop.
Rust LTO related instruction bug with opening files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root] | |
name = "bug_repr" | |
version = "0.0.1" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "bug_repr" | |
version = "0.0.1" | |
authors = ["Will Usher <[email protected]>"] | |
[[bin]] | |
name = "bug_repr" | |
path = "main.rs" | |
[profile.release] | |
opt-level = 0 | |
debug = false | |
rpath = false | |
lto = true | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiling bug_repr v0.0.1 (file:///home/sci/will/Repos/0b6efd45b420507901ac) | |
main.rs:4:9: 4:10 warning: unused variable: `f`, #[warn(unused_variables)] on by default | |
main.rs:4 let f = File::open(&Path::new("out.ppm")); | |
^ | |
main.rs:4:25: 4:34 warning: use of unstable item, #[warn(unstable)] on by default | |
main.rs:4 let f = File::open(&Path::new("out.ppm")); | |
^~~~~~~~~ | |
main.rs:4:13: 4:23 warning: use of unstable item, #[warn(unstable)] on by default | |
main.rs:4 let f = File::open(&Path::new("out.ppm")); | |
^~~~~~~~~~ | |
Instruction does not dominate all uses! | |
%oldret4 = insertvalue %"enum.core::result::Result<[\22()\22, \22core::fmt::Error\22]>[#2]" %oldret2, [0 x i8] %newret3, 2 | |
%.sink.i.i = phi %"enum.core::result::Result<[\22()\22, \22core::fmt::Error\22]>[#2]" [ %oldret10, %.noexc8.i ], [ %oldret4, %_ZN6string18String.fmt..String3fmt20h74aeaff0c04f8a35kCiE.exit ] | |
Instruction does not dominate all uses! | |
%94 = invoke fastcc { i8, [0 x i8], [0 x i8] } @"_ZN3fmt24Formatter$LT$$u{27}a$GT$3pad20h6fcd1b9b2d92a242qjwE"(%"struct.core::fmt::Formatter[#2]"* noalias dereferenceable(96) %1, %str_slice* noalias nocapture dereferenceable(16) %arg.i.i) | |
to label %_ZN6string18String.fmt..String3fmt20h74aeaff0c04f8a35kCiE.exit unwind label %unwind_ast_45109_.i | |
%newret = extractvalue { i8, [0 x i8], [0 x i8] } %94, 0 | |
Instruction does not dominate all uses! | |
%94 = invoke fastcc { i8, [0 x i8], [0 x i8] } @"_ZN3fmt24Formatter$LT$$u{27}a$GT$3pad20h6fcd1b9b2d92a242qjwE"(%"struct.core::fmt::Formatter[#2]"* noalias dereferenceable(96) %1, %str_slice* noalias nocapture dereferenceable(16) %arg.i.i) | |
to label %_ZN6string18String.fmt..String3fmt20h74aeaff0c04f8a35kCiE.exit unwind label %unwind_ast_45109_.i | |
%newret1 = extractvalue { i8, [0 x i8], [0 x i8] } %94, 1 | |
Instruction does not dominate all uses! | |
%94 = invoke fastcc { i8, [0 x i8], [0 x i8] } @"_ZN3fmt24Formatter$LT$$u{27}a$GT$3pad20h6fcd1b9b2d92a242qjwE"(%"struct.core::fmt::Formatter[#2]"* noalias dereferenceable(96) %1, %str_slice* noalias nocapture dereferenceable(16) %arg.i.i) | |
to label %_ZN6string18String.fmt..String3fmt20h74aeaff0c04f8a35kCiE.exit unwind label %unwind_ast_45109_.i | |
%newret3 = extractvalue { i8, [0 x i8], [0 x i8] } %94, 2 | |
LLVM ERROR: Broken function found, compilation aborted! | |
Could not compile `bug_repr`. | |
To learn more, run the command again with --verbose. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::File; | |
fn main() { | |
let f = File::open(&Path::new("out.ppm")); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment