aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-08-19 17:36:26 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-08-19 17:36:35 -0400
commit07c5e906010e85d7e6560dc3ed398d7e4b284ec0 (patch)
tree81cdb2ae9662ac51d905eea0ccd40948ebc99c2a /test
parentefc2237e5a545fac94ecc9c9757d202bda322abd (diff)
parent6bc520ab957e25f9ae6d0f4d8a8ad4b96e145ac3 (diff)
downloadzig-07c5e906010e85d7e6560dc3ed398d7e4b284ec0.tar.gz
zig-07c5e906010e85d7e6560dc3ed398d7e4b284ec0.zip
Merge branch 'mikdusan-issue.3010'
closes #3022 closes #3010 thanks @mikdusan
Diffstat (limited to 'test')
-rw-r--r--test/stage1/behavior/bitcast.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/stage1/behavior/bitcast.zig b/test/stage1/behavior/bitcast.zig
index 394ade1a21..92777e3d12 100644
--- a/test/stage1/behavior/bitcast.zig
+++ b/test/stage1/behavior/bitcast.zig
@@ -125,3 +125,9 @@ test "implicit cast to error union by returning" {
S.entry();
comptime S.entry();
}
+
+// issue #3010: compiler segfault
+test "bitcast literal [4]u8 param to u32" {
+ const ip = @bitCast(u32, [_]u8{ 255, 255, 255, 255 });
+ expect(ip == maxInt(u32));
+}