authorgravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2021-08-27 04:26:05+02:00
committergravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2021-09-20 02:29:04+02:00
log6336f08c2122faf712cb4b5096555e2617ce3936
tree327bfbfaafe2d53da092342e1dfa407738d146e6
parente77fcf17301ad5a68e84cb598984a526cc356621

Address Spaces: Address space on local variable test


1 files changed, 12 insertions(+), 0 deletions(-)

test/cases.zig+12
...@@ -1807,4 +1807,16 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -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}