aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-10-23 22:33:00 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-10-23 22:33:00 -0400
commit643ab90ace52d6d752a12ece9d6a8655ca2ca596 (patch)
tree6aac62b2b1274c272ecd1cbd3bb6f49e9b79471f /test
parentc1642355f0b05f182c0b6d81d294d12be79ad0a8 (diff)
downloadzig-643ab90ace52d6d752a12ece9d6a8655ca2ca596.tar.gz
zig-643ab90ace52d6d752a12ece9d6a8655ca2ca596.zip
add maximum value for @setAlignStack
Diffstat (limited to 'test')
-rw-r--r--test/cases/align.zig2
-rw-r--r--test/compile_errors.zig7
2 files changed, 8 insertions, 1 deletions
diff --git a/test/cases/align.zig b/test/cases/align.zig
index cd806a5dc6..3bf0d9c9af 100644
--- a/test/cases/align.zig
+++ b/test/cases/align.zig
@@ -188,6 +188,6 @@ test "alignstack" {
}
fn fnWithAlignedStack() -> i32 {
- @setAlignStack(1024);
+ @setAlignStack(256);
return 1234;
}
diff --git a/test/compile_errors.zig b/test/compile_errors.zig
index dd25886d2b..efab136d7e 100644
--- a/test/compile_errors.zig
+++ b/test/compile_errors.zig
@@ -2187,6 +2187,13 @@ pub fn addCases(cases: &tests.CompileErrorContext) {
".tmp_source.zig:3:5: error: alignstack set twice",
".tmp_source.zig:2:5: note: first set here");
+ cases.add("@setAlignStack too big",
+ \\export fn entry() {
+ \\ @setAlignStack(511 + 1);
+ \\}
+ ,
+ ".tmp_source.zig:2:5: error: attempt to @setAlignStack(512); maximum is 256");
+
cases.add("storing runtime value in compile time variable then using it",
\\const Mode = @import("builtin").Mode;
\\