Skip to content

Commit

Permalink
wip: Attempt to fix MacOS regression
Browse files Browse the repository at this point in the history
  • Loading branch information
CohenArthur committed Jan 26, 2024
1 parent 09d6ad2 commit 1c3f88f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion gcc/testsuite/rust/compile/builtin_macro_recurse2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@ macro_rules! a {
};
}

extern "C" {
fn printf(fmt: *const i8, ...);
}

fn print_ptr(s: &str) {
unsafe {
printf("%p\n\0" as *const str as *const i8, s as *const str);
}
}

fn main() {
// { dg-final { scan-assembler {"abheyho"} } }
let _ = concat!("a", 'b', a!(), a!(b c d e f a!()), '\0');
let s = concat!("a", 'b', a!(), a!(b c d e f a!()), '\0');
print_ptr(s);
}

0 comments on commit 1c3f88f

Please sign in to comment.