Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit 2044fd9

Browse files
authored
Merge pull request #343 from workingjubilee/jubilee-llvm-icing-itself
Adds 3 llvm_asm! related ICEs
2 parents 1265f7e + 40b3966 commit 2044fd9

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

ices/29382.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#![feature(llvm_asm)]
2+
unsafe fn test(x: *mut u32) {
3+
llvm_asm!("": "=m" (*x));
4+
}
5+
6+
fn main() {
7+
let mut x = 5u32;
8+
let r = &mut x as *mut u32;
9+
10+
unsafe {
11+
test(r);
12+
}
13+
}

ices/30606.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#![feature(llvm_asm)]
2+
3+
fn f() {}
4+
5+
fn main() {
6+
unsafe {llvm_asm!( "" :: "r"(f))}
7+
}

ices/31437.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#![feature(llvm_asm)]
2+
3+
fn test() -> () {
4+
unsafe {
5+
let test: i32;
6+
// using `str r0, [%0]` or any other instruction, it still crashes.
7+
llvm_asm!("mov %0, r0" : "=m"(test) ::);
8+
}
9+
}
10+
11+
fn main() {
12+
test();
13+
}

0 commit comments

Comments
 (0)