mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
15 lines
343 B
Rust
15 lines
343 B
Rust
//@ compile-flags: -O
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
// From <https://github.com/rust-lang/rust/issues/106369#issuecomment-1369095304>
|
|
|
|
// CHECK-LABEL: @issue_106369(
|
|
#[no_mangle]
|
|
pub unsafe fn issue_106369(ptr: *const &i32) -> bool {
|
|
// CHECK-NOT: icmp
|
|
// CHECK: ret i1 true
|
|
// CHECK-NOT: icmp
|
|
Some(std::ptr::read(ptr)).is_some()
|
|
}
|