aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-08-20 14:42:02 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-08-20 14:42:02 -0400
commitf0a141f79978d6d04b7cac1986b9bda770d3d6f9 (patch)
tree43b99a9c9095517a21869dac8ab0e7e0de7ab7e7 /test/compile_errors.zig
parent2aa18b909765a48878d3f30f638e79d6eee1b584 (diff)
parent276eb4402b3c54adef10033d1ec54bf2053cc563 (diff)
downloadzig-f0a141f79978d6d04b7cac1986b9bda770d3d6f9.tar.gz
zig-f0a141f79978d6d04b7cac1986b9bda770d3d6f9.zip
Merge branch 'FireFox317-fix-issue-3030'
closes #3084 closes #3030
Diffstat (limited to 'test/compile_errors.zig')
-rw-r--r--test/compile_errors.zig19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig
index cecb37620c..a6a1d0219b 100644
--- a/test/compile_errors.zig
+++ b/test/compile_errors.zig
@@ -2,6 +2,25 @@ const tests = @import("tests.zig");
const builtin = @import("builtin");
pub fn addCases(cases: *tests.CompileErrorContext) void {
+ cases.addCase(x: {
+ var tc = cases.create("variable in inline assembly template cannot be found",
+ \\export fn entry() void {
+ \\ var sp = asm volatile (
+ \\ "mov %[foo], sp"
+ \\ : [bar] "=r" (-> usize)
+ \\ );
+ \\}
+ , "tmp.zig:2:14: error: could not find 'foo' in the inputs or outputs.");
+ tc.target = tests.Target{
+ .Cross = tests.CrossTarget{
+ .arch = .x86_64,
+ .os = .linux,
+ .abi = .gnu,
+ },
+ };
+ break :x tc;
+ });
+
cases.add(
"indirect recursion of async functions detected",
\\var frame: ?anyframe = null;