about summary refs log tree commit diff
path: root/tests/codegen-llvm/intrinsics/rustc_intrinsic_must_be_overridden.rs
blob: b41e441d309daa83d6a0369d869f3ace30442bc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ revisions: OPT0 OPT1
//@ [OPT0] compile-flags: -Copt-level=0
//@ [OPT1] compile-flags: -Copt-level=1
//@ compile-flags: -Cno-prepopulate-passes

#![crate_type = "lib"]
#![feature(core_intrinsics)]

// CHECK-NOT: core::intrinsics::size_of_val

#[no_mangle]
pub unsafe fn size_of_val(ptr: *const i32) -> usize {
    core::intrinsics::size_of_val(ptr)
}