| ... | ... | @@ -1807,4 +1807,16 @@ pub fn addCases(ctx: *TestContext) !void { |
| 1807 | 1807 | \\} |
| 1808 | 1808 | , ""); |
| 1809 | 1809 | } |
| 1810 | |
| 1811 | { |
| 1812 | var case = ctx.exe("setting an address space on a local variable", linux_x64); |
| 1813 | case.addError( |
| 1814 | \\export fn entry() i32 { |
| 1815 | \\ var foo: i32 addrspace(".general") = 1234; |
| 1816 | \\ return foo; |
| 1817 | \\} |
| 1818 | , &[_][]const u8{ |
| 1819 | ":2:28: error: cannot set address space of local variable 'foo'", |
| 1820 | }); |
| 1821 | } |
| 1810 | 1822 | } |