aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/execute/torture/helloworld1.rs
blob: 8803156b5fd6667bb52bb5fb7eb95a577f495ad0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-output "Hello World\r*" }*/
extern "C" {
    fn puts(s: *const i8);
}

fn main() -> i32 {
    unsafe {
        let a = "Hello World";
        let b = a as *const str;
        let c = b as *const i8;

        puts(c);
    }
    0
}