mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
19 lines
270 B
Plaintext
19 lines
270 B
Plaintext
// #target: macos-x64
|
|
module test;
|
|
|
|
fn int main()
|
|
{
|
|
int x = *(int*)1;
|
|
return 0;
|
|
}
|
|
|
|
/* #expect: test.ll
|
|
|
|
define i32 @main() #0 {
|
|
entry:
|
|
%x = alloca i32, align 4
|
|
%0 = load i32, ptr inttoptr (i64 1 to ptr), align 1
|
|
store i32 %0, ptr %x, align 4
|
|
ret i32 0
|
|
}
|