compiler error when variable in asm template cannot be found
This commit is contained in:
committed by
Andrew Kelley
parent
2aa18b9097
commit
2addec8ea1
@@ -2,6 +2,18 @@ const tests = @import("tests.zig");
|
||||
const builtin = @import("builtin");
|
||||
|
||||
pub fn addCases(cases: *tests.CompileErrorContext) void {
|
||||
cases.add(
|
||||
"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."
|
||||
);
|
||||
|
||||
cases.add(
|
||||
"indirect recursion of async functions detected",
|
||||
\\var frame: ?anyframe = null;
|
||||
|
||||
Reference in New Issue
Block a user