Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
ptr_ops
/
issue-80309.rs
blob: c9b1af5540a17603989e4a5d1a40aae8e6e653aa [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
//@ compile-flags: -O
// Regression test for issue #80309
pub
unsafe
fn
foo
(
x
:
*
const
i8
)
->
i8
{
*
x
.
wrapping_sub
(
x
as
_
).
wrapping_add
(
x
as
_
)
}
fn
main
()
{
let
x
=
42
;
println
!(
"{}"
,
unsafe
{
foo
(&
x
)
});
}