aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/asm_at_compile_time.zig
blob: aba823a37e0860b6819f1db5cb0935796f96dbde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
comptime {
    doSomeAsm();
}

fn doSomeAsm() void {
    asm volatile (
        \\.globl aoeu;
        \\.type aoeu, @function;
        \\.set aoeu, derp;
    );
}

// error
//
// :6:5: error: unable to evaluate comptime expression
// :2:14: note: called at comptime from here
// :1:1: note: 'comptime' keyword forces comptime evaluation