mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Negating a global address with offset was a counted as a global runtime constant #2865 - Converting static "make_slice" to array failed to be handled #2866 - Narrowing a not expression was incorrectly handled #2867 - Vector shift by optional scalar failed #2868
36 lines
1023 B
Plaintext
36 lines
1023 B
Plaintext
// #target: macos-x64
|
|
module test;
|
|
import std;
|
|
fn int[3] test()
|
|
{
|
|
int[3] x = io::EOF~!!;
|
|
return (int[])&x;
|
|
}
|
|
fn int main()
|
|
{
|
|
test();
|
|
return 0;
|
|
}
|
|
|
|
/* #expect: test.ll
|
|
|
|
|
|
define { i64, i32 } @test.test() #0 {
|
|
entry:
|
|
%x = alloca [3 x i32], align 4
|
|
%error_var = alloca i64, align 8
|
|
%varargslots = alloca [1 x %any], align 16
|
|
%indirectarg = alloca %"any[]", align 8
|
|
store i64 ptrtoint (ptr @std.io.EOF to i64), ptr %error_var, align 8
|
|
br label %panic_block
|
|
|
|
panic_block: ; preds = %entry
|
|
%0 = insertvalue %any undef, ptr %error_var, 0
|
|
%1 = insertvalue %any %0, i64 ptrtoint (ptr @"$ct.fault" to i64), 1
|
|
store %any %1, ptr %varargslots, align 16
|
|
%2 = insertvalue %"any[]" undef, ptr %varargslots, 0
|
|
%"$$temp" = insertvalue %"any[]" %2, i64 1, 1
|
|
store %"any[]" %"$$temp", ptr %indirectarg, align 8
|
|
call void @std.core.builtin.panicf(ptr @.panic_msg, i64 36, ptr @.file, i64 35, ptr @.func, i64 4, i32 5, ptr byval(%"any[]") align 8 %indirectarg) #2
|
|
unreachable
|
|
} |