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