blob: 75df3cc78e5a6b5ca9e7e58e9fb2507b23a6ec9a [file]
#![feature(no_core)]
#![no_core]
const A: i32 = (1 / 0);
// { dg-error "division by zero" "" { target *-*-* } .-1 }
// { dg-error "is not a constant expression" "" { target *-*-* } .-2 }
fn main() {
let a = 1 / 0;
// { dg-error "division by zero" "" { target *-*-* } .-1 }
let b = 3;
let c = b / 0;
// { dg-error "division by zero" "" { target *-*-* } .-1 }
let a = 1 << 500;
// { dg-error "left shift count >= width of type" "" { target *-*-* } .-1 }
}