rust/tests/crashes/111699.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
218 B
Rust
Raw Normal View History

//@ known-bug: #111699
#![feature(core_intrinsics)]
use std::intrinsics::offset;
fn main() {
let a = [1u8, 2, 3];
let ptr: *const u8 = a.as_ptr();
unsafe {
assert_eq!(*offset(ptr, 0), 1);
}
}