| ... | ... | @@ -11,7 +11,7 @@ const linux_x64 = std.zig.CrossTarget{ |
| 11 | 11 | pub fn addCases(ctx: *TestContext) !void { |
| 12 | 12 | // TODO: re-enable these tests. |
| 13 | 13 | // https://github.com/ziglang/zig/issues/1364 |
| 14 | | ctx.addZIRError("test", linux_x64, |
| 14 | ctx.addZIRError("call undefined local", linux_x64, |
| 15 | 15 | \\@noreturn = primitive(noreturn) |
| 16 | 16 | \\ |
| 17 | 17 | \\@start_fnty = fntype([], @noreturn, cc=Naked) |
| ... | ... | @@ -20,14 +20,32 @@ pub fn addCases(ctx: *TestContext) !void { |
| 20 | 20 | \\}) |
| 21 | 21 | , &[_][]const u8{"5:13:unrecognized identifier: %test"}); |
| 22 | 22 | |
| 23 | | // ctx.addZIRError("call with non-existent target", linux_x64, |
| 24 | | // \\@noreturn = primitive(noreturn) |
| 25 | | // \\ |
| 26 | | // \\@start_fnty = fntype([], @noreturn, cc=Naked) |
| 27 | | // \\@start = fn(@start_fnty, { |
| 28 | | // \\ %0 = call(@notafunc, []) |
| 29 | | // \\}) |
| 30 | | // , &[_][]const u8{"5:13:unrecognized identifier: @notafunc"}); |
| 23 | // TODO: fix this test |
| 24 | // ctx.addZIRError("call with non-existent target", linux_x64, |
| 25 | // \\@noreturn = primitive(noreturn) |
| 26 | // \\ |
| 27 | // \\@start_fnty = fntype([], @noreturn, cc=Naked) |
| 28 | // \\@start = fn(@start_fnty, { |
| 29 | // \\ %0 = call(@notafunc, []) |
| 30 | // \\}) |
| 31 | // \\@0 = str("_start") |
| 32 | // \\@1 = ref(@0) |
| 33 | // \\@2 = export(@1, @start) |
| 34 | // , &[_][]const u8{"5:13:unrecognized identifier: @notafunc"}); |
| 35 | |
| 36 | // TODO: this error should occur at the call site, not the fntype decl |
| 37 | ctx.addZIRError("call naked function", linux_x64, |
| 38 | \\@noreturn = primitive(noreturn) |
| 39 | \\ |
| 40 | \\@start_fnty = fntype([], @noreturn, cc=Naked) |
| 41 | \\@s = fn(@start_fnty, {}) |
| 42 | \\@start = fn(@start_fnty, { |
| 43 | \\ %0 = call(@s, []) |
| 44 | \\}) |
| 45 | \\@0 = str("_start") |
| 46 | \\@1 = ref(@0) |
| 47 | \\@2 = export(@1, @start) |
| 48 | , &[_][]const u8{"4:9:unable to call function with naked calling convention"}); |
| 31 | 49 | |
| 32 | 50 | //try ctx.testCompileError( |
| 33 | 51 | // \\export fn entry() void {} |