2019-12-08 01:45:41 +01: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;
|
2018-11-26 15:31:53 +01:00
|
|
|
let _val = unsafe { x.offset(isize::min_value()) };
|
2017-06-04 18:47:31 -07:00
|
|
|
}
|