forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#72400 - Aaron1011:fix/asm-incr-ice, r=Amanieu
Add missing ASM arena declarations to librustc_middle Fixes rust-lang#72386 These types also need to get allocated on the `librustc_middle` arena when we deserialize MIR. @Amanieu: If we end up using your approach in rust-lang#72392 instead, feel free to copy the test I added over to your PR.
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// revisions: rpass1 cfail1 rpass3 | ||
// only-x86_64 | ||
// Regression test for issue #72386 | ||
// Checks that we don't ICE when switching to an invalid register | ||
// and back again | ||
|
||
#![feature(asm)] | ||
|
||
#[cfg(any(rpass1, rpass3))] | ||
fn main() { | ||
unsafe { | ||
asm!("nop") | ||
} | ||
} | ||
|
||
#[cfg(cfail1)] | ||
fn main() { | ||
unsafe { | ||
asm!("nop",out("invalid_reg")_) | ||
//[cfail1]~^ ERROR invalid register | ||
} | ||
} |