reid-llvm/examples/cast.reid

16 lines
197 B
Plaintext

// Arithmetic, function calls and imports!
import std::print;
fn other() -> i16 {
return 6;
}
fn main() -> u32 {
let mut v = (malloc(4) as *u32);
v[0] = other() as u32;
return v[0];
}