]> git.lizzy.rs Git - rust.git/blob - tests/incremental/issue-72386.rs
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / incremental / issue-72386.rs
1 // revisions: rpass1 cfail1 rpass3
2 // needs-asm-support
3 // only-x86_64
4 // Regression test for issue #72386
5 // Checks that we don't ICE when switching to an invalid register
6 // and back again
7
8 use std::arch::asm;
9
10 #[cfg(any(rpass1, rpass3))]
11 fn main() {
12     unsafe { asm!("nop") }
13 }
14
15 #[cfg(cfail1)]
16 fn main() {
17     unsafe {
18         asm!("nop",out("invalid_reg")_)
19         //[cfail1]~^ ERROR invalid register
20     }
21 }