Skip to content

Commit 1c3f88f

Browse files
committed
wip: Attempt to fix MacOS regression
1 parent 09d6ad2 commit 1c3f88f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

gcc/testsuite/rust/compile/builtin_macro_recurse2.rs

+12-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,18 @@ macro_rules! a {
1515
};
1616
}
1717

18+
extern "C" {
19+
fn printf(fmt: *const i8, ...);
20+
}
21+
22+
fn print_ptr(s: &str) {
23+
unsafe {
24+
printf("%p\n\0" as *const str as *const i8, s as *const str);
25+
}
26+
}
27+
1828
fn main() {
1929
// { dg-final { scan-assembler {"abheyho"} } }
20-
let _ = concat!("a", 'b', a!(), a!(b c d e f a!()), '\0');
30+
let s = concat!("a", 'b', a!(), a!(b c d e f a!()), '\0');
31+
print_ptr(s);
2132
}

0 commit comments

Comments
 (0)