aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/asm_output_to_const.zig
blob: aa20a489aaec30fc2ba078b9a3d52dce9d19aeb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
export fn foo() void {
    const f: i64 = 1000;

    asm volatile (
        \\ movq $10, %[f]
        : [f] "=r" (f),
    );
}

// error
// backend=llvm
// target=native
//
// :4:5: error: asm cannot output to const local 'f'