]> git.lizzy.rs Git - rust.git/blob - src/test/ui/ptr_ops/issue-80309.rs
Update the minimum external LLVM to 13
[rust.git] / src / test / ui / ptr_ops / issue-80309.rs
1 // run-pass
2 // compile-flags: -O
3
4 // Regression test for issue #80309
5
6 pub unsafe fn foo(x: *const i8) -> i8 {
7     *x.wrapping_sub(x as _).wrapping_add(x as _)
8 }
9
10 fn main() {
11     let x = 42;
12     println!("{}", unsafe { foo(&x) });
13 }