mirror of
https://github.com/Noratrieb/rlo-issue-112061.git
synced 2026-01-15 17:05:03 +01:00
more
This commit is contained in:
parent
3e1215e870
commit
096d0e78ac
6 changed files with 44 additions and 10 deletions
26
code.rs
26
code.rs
|
|
@ -1,9 +1,18 @@
|
|||
use std::ptr;
|
||||
#[inline(never)]
|
||||
pub fn print_var(v: u8) {
|
||||
println!("{v}");
|
||||
|
||||
extern "C" {
|
||||
pub fn print_var(v: u8);
|
||||
}
|
||||
pub unsafe fn fn12_rs() {
|
||||
#[cfg(pure_rust)]
|
||||
mod impl_ {
|
||||
#[no_mangle]
|
||||
pub extern "C" fn print_var(v: u8) {
|
||||
println!("{v}");
|
||||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn fn12_rs() {
|
||||
let mut bool_storage: bool = false;
|
||||
let mut v9: usize = 0;
|
||||
|
||||
|
|
@ -12,7 +21,8 @@ pub unsafe fn fn12_rs() {
|
|||
let v20_ptr = ptr::addr_of_mut!(v20);
|
||||
let mut v12: *mut u8 = core::ptr::addr_of_mut!((*v20_ptr)[v9]);
|
||||
v9 = 2_usize; // unused but necessary write
|
||||
loop { // only runs once, but necessary
|
||||
loop {
|
||||
// only runs once, but necessary
|
||||
match *v12 {
|
||||
197 => {
|
||||
let mut match_condition: u64 = 0;
|
||||
|
|
@ -60,8 +70,10 @@ pub unsafe fn fn12_rs() {
|
|||
}
|
||||
}
|
||||
}
|
||||
pub fn main() {
|
||||
|
||||
#[cfg(pure_rust)]
|
||||
fn main() {
|
||||
unsafe {
|
||||
fn12_rs();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue