Skip to content

Commit cb0c877

Browse files
author
Jorge Aparicio
committed
print FP values as integers
to avoid rust-lang/compiler-builtins#79
1 parent 35afbd4 commit cb0c877

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/fpu.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ pub extern "C" fn main() -> ! {
1313
let y = black_box(3_f32);
1414
let z = black_box(x * y);
1515

16-
iprintln!("{} * {} = {}", x, y, z);
16+
// FIXME(japaric/rustc-builtins#79) there is a problem with the
17+
// rustc-builtins (compiler-builtins-snapshot) crate and LTO. Avoid the
18+
// issue by printing these values as integers because integer formatting
19+
// doesn't need any intrinsic.
20+
iprintln!("{} * {} = {}", x as u32, y as u32, z as u32);
1721

1822
loop {}
1923
}

0 commit comments

Comments
 (0)