2021-09-06 10:44:19 -05:00
|
|
|
// needs-asm-support
|
|
|
|
// ignore-nvptx64
|
|
|
|
// ignore-spirv
|
|
|
|
// ignore-wasm32
|
2021-08-12 14:23:34 -05:00
|
|
|
// Make sure rustc doesn't ICE on asm! when output type is !.
|
|
|
|
|
2021-12-09 18:15:33 -06:00
|
|
|
use std::arch::asm;
|
2021-08-12 14:23:34 -05:00
|
|
|
|
|
|
|
fn hmm() -> ! {
|
|
|
|
let x;
|
|
|
|
unsafe {
|
|
|
|
asm!("/* {0} */", out(reg) x);
|
|
|
|
//~^ ERROR cannot use value of type `!` for inline assembly
|
|
|
|
}
|
|
|
|
x
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
hmm();
|
|
|
|
}
|