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

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

// error
//
// :4:5: error: asm cannot output to const local 'f'