aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/pointers_with_different_address_spaces.zig
blob: 2a7698d0d99986a2db93cfa6feeeb9473e378407 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
fn entry(a: ?*addrspace(.gs) i32) *i32 {
    return a.?;
}
pub fn main() void {
    _ = entry;
}

// error
// output_mode=Exe
// backend=stage2,llvm
// target=x86_64-linux,x86_64-macos
//
// :2:13: error: expected type '*i32', found '*addrspace(.gs) i32'
// :2:13: note: address space 'gs' cannot cast into address space 'generic'