gcc/testsuite/rust/execute/torture/extern_mod4.rs
raw| 1 | // { dg-additional-options "-w" } |
| 2 | // { dg-output "12\r*" } |
| 3 | mod modules; |
| 4 | |
| 5 | extern "C" { |
| 6 | fn printf(s: *const i8, ...); |
| 7 | } |
| 8 | |
| 9 | fn main() -> i32 { |
| 10 | unsafe { |
| 11 | let fmt_s = "%d\n\0"; |
| 12 | let fmt_p = fmt_s as *const str; |
| 13 | let fmt_i8 = fmt_p as *const i8; |
| 14 | |
| 15 | printf(fmt_i8, modules::return_12()); |
| 16 | } |
| 17 | |
| 18 | return 0; |
| 19 | } |