2022-03-17 13:49:10 +00:00
|
|
|
// error-pattern: overflowing in-bounds pointer arithmetic
|
2017-06-04 18:47:31 -07:00
|
|
|
fn main() {
|
|
|
|
let v = [1i8, 2];
|
|
|
|
let x = &v[1] as *const i8;
|
2020-03-04 13:01:06 +01:00
|
|
|
let _val = unsafe { x.offset(isize::MIN) };
|
2017-06-04 18:47:31 -07:00
|
|
|
}
|