aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNoam Preil <pleasantatk@gmail.com>2020-05-27 09:20:06 -0400
committerNoam Preil <pleasantatk@gmail.com>2020-06-15 17:51:43 -0400
commitbebc1f49cf2e480fbd5dc2a409ee1bc0fe3de331 (patch)
tree1cbca3afedc5f310a3af6196328ac5cbee758b2c /test
parent2d1d012f1194e1e26f123891e12921d59ffe9e10 (diff)
downloadzig-bebc1f49cf2e480fbd5dc2a409ee1bc0fe3de331.tar.gz
zig-bebc1f49cf2e480fbd5dc2a409ee1bc0fe3de331.zip
[Stage2/Testing] Add (failing) test
Diffstat (limited to 'test')
-rw-r--r--test/stage2/compile_errors.zig14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/stage2/compile_errors.zig b/test/stage2/compile_errors.zig
index 0133e55477..89761736d9 100644
--- a/test/stage2/compile_errors.zig
+++ b/test/stage2/compile_errors.zig
@@ -23,6 +23,20 @@ pub fn addCases(ctx: *TestContext) !void {
.msg = "unrecognized identifier: %test",
}}, &[_]ErrorMsg{}, &[_]ErrorMsg{});
+ ctx.addZIRError("call with non-existent target", linux_x64,
+ \\@noreturn = primitive(noreturn)
+ \\
+ \\@start_fnty = fntype([], @noreturn, cc=Naked)
+ \\@start = fn(@start_fnty, {
+ \\ %0 = call(@notafunc, [])
+ \\})
+ , &[_]ErrorMsg{
+ .{
+ .byte_offset = 118,
+ .msg = "unrecognized identifier: @notafunc",
+ },
+ }, &[_]ErrorMsg{}, &[_]ErrorMsg{});
+
//try ctx.testCompileError(
// \\export fn entry() void {}
// \\export fn entry() void {}