aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/execute/torture/multiline-string.rs
blob: 4d22f991ad3580868a46da4e11c8678b57b336f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// { dg-output "gcc\n\nrs\n" }

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

fn main() -> i32 {
    let a = "gcc

rs\0";

    unsafe { printf("%s\n\0" as *const str as *const i8, a as *const str as *const i8); }

    0
}