Files
zig/test/cases/compile_errors/asm_output_to_const.zig

19 lines
327 B
Zig

export fn foo() void {
const local: usize = 0;
asm volatile (""
: [_] "=r" (local),
);
}
const global: usize = 0;
export fn bar() void {
asm volatile (""
: [_] "=r" (global),
);
}
// error
//
// :4:21: error: asm cannot output to const '_'
// :11:21: error: asm cannot output to const '_'