aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/pointer_with_different_address_spaces.zig
blob: b60de50600e8b2c2c1dd6a63f2a846ad4aa83a48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
fn entry(a: *addrspace(.gs) i32) *addrspace(.fs) i32 {
    return a;
}
export fn entry2() void {
    _ = &entry;
}

// error
// output_mode=Obj
// target=x86_64-linux,x86_64-macos
//
// :2:12: error: expected type '*addrspace(.fs) i32', found '*addrspace(.gs) i32'
// :2:12: note: address space 'gs' cannot cast into address space 'fs'
// :1:34: note: function return type declared here